Click events for aps.net chart not working

Posted by Vidhyapathy under ASP.NET on 8/14/2015 | Points: 10 | Views : 518 | Status : [Member] | Replies : 1
I m working Asp.net chart and showing few data, i tried with default click even in chart and trying to debug. I m getting error as Error 1 No overload for 'Chart1_Click' matches delegate 'System.Web.UI.ImageClickEventHandler'

Below are codes. Please help me to fix the same.

protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
Chart1.Click += new ImageClickEventHandler(Chart1_Click);
...
..
}}

protected void Chart1_Click(object sender, ImageMapEventArgs e)
{
string s = e.PostBackValue;

}




Responses

Posted by: Rajayadav on: 8/21/2015 [Member] Starter | Points: 25

Up
0
Down
Hi,

Chart1_Click events required two paramater but you are passing only one like

Chart1.Click += new ImageClickEventHandler(Chart1_Click);

Please pass two paramaters like sample bellow for chart1_Click
try like

Chart1_Click(null,null)



Thanks
-Raja

Vidhyapathy, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response