我在网页 (aspx) 上使用 Shield UI ASP.NET 图表。我需要根据下拉列表中的选定项刷新图表并显示数据。但是发生的情况是,当按下按钮时,页面会重新加载,我需要其他图表保留它们选择的系列。这是我的代码:
protected void Button1_Click(object sender, EventArgs e)
{
if (DropDownList1.SelectedIndex == 0) {
ShieldChart3.DataSource = new List<int>() { 12, 3, 4, 2, 12, 3, 4, 17, 22, 34, 54, 67 };
}
if (DropDownList1.SelectedIndex == 1)
{
ShieldChart3.DataSource = new List<int>() { 3, 9, 12, 14, 22, 32, 45, 12, 67, 45, 55, 7 };
}
if (DropDownList1.SelectedIndex == 2)
{
ShieldChart3.DataSource = new List<int>() { 23, 19, 11, 134, 242, 352, 435, 22, 637, 445, 555, 57 };
}
if (DropDownList1.SelectedIndex == 3)
{
ShieldChart3.DataSource = new List<int>() { 13, 19, 112, 114, 212, 332, 435, 132, 67, 45, 55, 7 };
}
}
如何仅刷新重新加载页面的图表之一?