Using the OnInit event in asp.net
<p>I have contentpage overriding the OnInit event of a masterpage. The override works fine, until I put a custom user control on the page: in this case the OnInit event does not fire for the contentpage (no overrides are used in the user control)</p>

<p>What are the possible causes/solutions for this? (I use the OnInit event to create dynamic controls)</p>

<p><hr /></p>

<p><strong>Edit:</strong></p>

<p>now i tried this in the content page:</p>

<p>(The OnPreInit part runs, but Masters_Init does not get called...)</p>

<pre><code>    protected override void OnPreInit(EventArgs e)
    {
        base.Master.Init += new EventHandler(Masters_Init);
    }

    void Masters_Init(object sender, EventArgs e)
    { 
    //code 
    }
</code></pre>
