unable to capture ImageButton click in postback event
<p>Unable to capture the Imagebuttonclick event in postback.</p>

<p>I am using the below code for Button click and tried for Imagebutton as well however "Button" click its working and not for Image button.</p>

<pre><code>public Control GetPostBackControl(Page page)
    {
        Control control = null;

        string ctrlname = page.Request.Params.Get("__EVENTTARGET");
        if ((ctrlname != null) &amp; ctrlname != string.Empty)
        {
            control = page.FindControl(ctrlname);
        }
        else
        {
            foreach (string ctl in page.Request.Form)
            {
                Control c = page.FindControl(ctl);
                if (c is System.Web.UI.WebControls.Button)
                {
                    control = c;
                    break;
                }
            }
        }
        return control;
    }
</code></pre>

<p>Any solution?</p>
