Response.redirect for MS Chart
I have a chart control.
Now the functionality i want is if the user clicks on the chart it takes it to a new page along with it i need to send a value to that page.
i tried this but the click even is not working..
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");
}
}
I know we can put a URL in the Html but then i cannot put a condition in it....?
any help will be appreciated.
Thanks
<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>
开发者_Go百科 </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>
Can you post the design view of the chart .
chart4.Series["seriesname"].Url = "somechartorpage.aspx?"+label1.text;
chart4.Series["seriesname"].Points["name"].Url= "Detailedchart.aspx";
精彩评论