I am creating a control on the fly and then adding a click event to it. But I keep getting the error :
'The target 'ctl' for the callback could not be found or did not implement ICallbackEventHandler'
Here is my code related to the click event :
cht.Click += new ImageClickEventHandler(cht_Click);
protected void cht_Click(object sender, ImageClickEventArgs e)
{
}
I have googled this problem and found a suggestion that this can be solved by creating the click event in Page_Load, but this is not possible in this case. Is there any other way around this?
'The target 'ctl' for the callback could not be found or did not implement ICallbackEventHandler'
Here is my code related to the click event :
cht.Click += new ImageClickEventHandler(cht_Click);
protected void cht_Click(object sender, ImageClickEventArgs e)
{
}
I have googled this problem and found a suggestion that this can be solved by creating the click event in Page_Load, but this is not possible in this case. Is there any other way around this?