0

请帮我解决这个问题。我需要在图表中显示动态数据(谷歌图表)

我在 asplabels 中有这些数据,我需要将这些数据动态插入到 Charts url 中。

假设标签 ID 如下:

我需要将这些标签值用于以下网址 http://chart.apis.google.com/chart?chf=c,s,C3D9FF&chxr=0,0 , lblDayLimit,lblMonthLimit 1&chxt=x&chbh=32,3,0。

请帮助

提前致谢

4

1 回答 1

0

执行以下操作:

声明受保护的字符串变量:

 protected string DayLimit = string.empty;
 protected string MonthLimit = string.empty;

在设置标签值时设置它们:

 DayLimit = lblDayLimit.Text;
 MonthLimit  = lblMonthLimit.Text;

然后在页面上使用它们,在构造如下 URL 时:

 http://chart.apis.google.com/chart?chf=c,s,C3D9FF&chxr=0,0,<%=DayLimit%>,<%=MonthLimit%>&chxt=x&chbh=32,3,0
于 2010-10-22T08:20:20.453 回答