我有一个图表控件。MS Chart的Response.redirect
现在我想要的功能是,如果用户点击图表,它需要它到一个新的页面,我需要发送一个值到该页面。
我试过,但点击甚至不工作..
protected void Chart1_Click(object sender, ImageMapEventArgs e)
{
if (Label1.Text != "1")
{
Response.Redirect("~/Admin/Page2Chart.aspx?node=" + Label1.Text);
}
else
{
Response.Redirect("~/Admin/Page2Chart.aspx");
}
}
我知道我们可以把一个URL的HTML,但后来我不能把一个条件是....?
任何帮助将不胜感激。
感谢
<asp:Chart ID="Chart4" Height="202px" Width="360px" runat="server"
onclick="Chart4_Click" >
<Series>
<asp:Series ChartType="Pie" Name="Series1" Font="Microsoft Sans Serif, 10pt" >
</asp:Series>
</Series>
<ChartAreas>
<asp:ChartArea Name="ChartArea1">
</asp:ChartArea>
</ChartAreas>
<Legends>
<asp:Legend Enabled="true" TableStyle="Tall" IsTextAutoFit="False" Name="Default" BackColor="Transparent" Font="Trebuchet MS, 8.25pt, style=Bold">
</asp:Legend>
</Legends>
</asp:Chart>
我看不出你写的东西有什么问题。当你说“点击甚至[原文如此失效]”,你的意思是这个事件没有被解雇?或者Response.Redirects没有按照你的计划工作?尝试调试您的应用程序,并在点击处理程序上设置断点以查看事件过程是否正在执行,并让我知道发生了什么。 – pseudocoder 2011-04-27 14:55:36