Dynamically loaded control
<p>I've got a page that uses a master page.  The master page has 2 contentplaceholders on it.  The page has content controls on it that correspond to the placeholders on the master page.  I need to dynamically insert a usercontrosl into those content areas.  I can't seem to get a reference to the content controls at run time so that I can insert the controls into them.  See code below:</p>

<p>Master Page:</p>

<pre><code>&lt;%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site1.master.cs"      Inherits="Agile.Portal.Site1" %&gt;

&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0     Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;

&lt;html xmlns="http://www.w3.org/1999/xhtml" &gt;
&lt;head runat="server"&gt;
    &lt;title&gt;&lt;/title&gt;
&lt;asp:ContentPlaceHolder ID="head" runat="server"&gt;
&lt;/asp:ContentPlaceHolder&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;form id="form1" runat="server"&gt;
&lt;div&gt;
    &lt;asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server"&gt;

    &lt;/asp:ContentPlaceHolder&gt;
&lt;/div&gt;
&lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>WebPage:</p>

<pre><code>&lt;%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true"      CodeBehind="WebForm1.aspx.cs" Inherits="Agile.Portal.WebForm1" %&gt;
&lt;asp:Content ID="head" ContentPlaceHolderID="head" runat="server"&gt;
&lt;/asp:Content&gt;
 &lt;asp:Content ID="ContentPlaceHolder1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"&gt;
 &lt;/asp:Content&gt;
</code></pre>

<p>Code:</p>

<pre><code>    protected override void OnInit(EventArgs e)
    {
        //  YOU SUCK, you're always null!!!
        System.Web.UI.WebControls.Content cnt = (System.Web.UI.WebControls.Content)this.FindControl("ContentPlaceHolder1");
        Agile.Portal.Framework.BaseModule mod = (Agile.Portal.Framework.BaseModule)LoadControl("~/modules/HTMLModule/HtmlModule.ascx");
        cnt.Controls.Add(mod);
        base.OnInit(e);
    }
</code></pre>
