why dynamically added user control's button event not getting fired?
<p>I have loading a -user control dynamically it has got some submit button code, the usercontrol get successfully registered at run time, but do not fire it's submit button event on button click, what i am missing would any body tell me on this?</p>

<p>see here is my code</p>

<pre><code> switch (ContentTypeID)
        {
            case 1:
                myCtrl = Page.LoadControl("~/Controls/DocumentSpreadSheet.ascx");

                if (myCtrl != null)
                {
                    ((Controls_DocumentSpreadSheet)myCtrl).ddlList = int.Parse(ddlList.SelectedValue);
                    pnlDetails.Controls.Add(myCtrl);
                }
                break;
            case 2:
</code></pre>

<p>now the user control being registered at run time has some button which has the following event</p>

<pre><code> protected void btnSave_Click(object sender, EventArgs e)
    {
        if (checkRequiredFields(true) == true)
        {
            saveContentDetails();
            btnCancel_Click(null, null);
            //   loadSummaryGrid(true);
        }
        else
        {
            showMessageBox("Invalid data; please correct all errors.");
        }

    }
</code></pre>

<p>this event not getting fired, i have attached the break point and observed it.</p>

<p>rendered mark up</p>

<pre><code>&lt;div id="MainContent_ctl00_divButtons"&gt;
    &lt;table cellspacing="0" cellpadding="0" border="0" style="width: 97%;
        margin: 10px;" id="Table3"&gt;
        &lt;tbody&gt;&lt;tr&gt;
            &lt;td align="center" colspan="4"&gt;
                &lt;input type="image" src="../images/submit_btn.png" id="MainContent_ctl00_btnInsert" name="ctl00$MainContent$ctl00$btnInsert"&gt;
                &amp;nbsp;
                &lt;input type="image" src="../images/cancel-btn.png" id="MainContent_ctl00_btnCancel" name="ctl00$MainContent$ctl00$btnCancel"&gt;
                &amp;nbsp;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;

            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
</code></pre>

<p></p>

<p>the actual mark up

            
            &nbsp;
            
            &nbsp;
        
    </p>
