asp.net : How to check if a dynamically created control has posted back 
<p>how to check if a dynamically created control has posted back?The below code is not working.</p>

<pre><code>Control control = null;

    string ctrlname = page.Request.Params.Get("__EVENTTARGET");
    if (ctrlname != null &amp;&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;
            }
            if (c is System.Web.UI.WebControls.ImageButton)
            {
                control = c;
                break;
            }
        }
    }
    return control;
</code></pre>

<p>I have created some imagebuttons dyanmically on page_Init. But the above code always returns null. Why is that? How can I check If an image button has posted back?</p>

<p>Note: I am able to handle the click events of those imagebuttons.</p>
