I have created image button at run time. But I want to know when I will click on this button then its click function will get call.How to create click event of this image button.
I have tried
Function bindgrid()
{
Buttonname.click+-new ImageClickEventHandler(Buttonname_click);
}
Protected void Buttonname_click(object sender, ImageClickEventArgs e)
{
}
But it is working only when bindgrid function calls on every post back.otherwise not if bindgrid function is put under (!page.postback)