Server controls on custom Web User Control's events not firing when added dynamically to page
<p>I'm having a little problem while trying to dynamically add a web user control on an ASPX page, I've read up on the page lifecycle and saw some suggestions to add the dynamic controls as early in the page lifecycle as possible. As of right now the controls are created on the PreInit event like the following code block:</p>

<pre><code>    protected override void OnPreInit(EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            lstQuestions = new List&lt;ucQuestion&gt;();
            Session["listQuestionss"] = lstQuestions;
            ucQuestion q = null;
            for (int i = 0; i &lt; MIN_QUESTIONS; i++)
            {
                q = LoadControl("~/UserControls/Exam/ucQuestion.ascx") as ucQuestion;
                q.ID = String.Format("Question{0}", listQuestions.Count + 1);
                listQuestions.Add(q);
            }
        }
        else
        {
            if (Session["listQuestions"] != null)
            {
                listQuestions = Session["listQuestions"] as List&lt;lstQuestions&gt;;
            }
            else
            {
                Response.Redirect("~/Views/HR/Exams/AddExam.aspx");
            }
        }
        base.OnPreInit(e);
    }
</code></pre>

<p>And then onInit I have the following:</p>

<pre><code>    protected override void OnInit(EventArgs e)
    {
        foreach (ucQuestion q in lstQuestions)
        {
            divQuestions.Controls.Add(q);
        }
        base.OnInit(e);
    }
</code></pre>

<p>The ucQuestion user control has a few labels, some textboxes and a FileUpload with a button to save the posted file, when I press the button, the page gets posted back, but the breakpoint in my code never gets hit, in short I need to know if there's something I'm doing wrong while adding the Control that doesn't bind the controls to their proper events. if I add the user control statically the events work all right, it's just that the user can add an as many questions to the exam as he sees fit, so I have to add them dynamically. </p>
