How to add usercontol into a aspx page loaded by a master page file?
<p>I am a beginner in .net. I use master page to define the page layout of default.aspx. In the master page I have included ContentPlaceHolder cph. I want to access cph from default.aspx and load the ascx file into cph. How can I do this? I tried the code below in page load event, but it does not work. pls advice.</p>

<pre><code>     string controlPath = "~/Usercontrols/webusercontrol.ascx";
     UserControl uc = LoadControl(controlPath) as UserControl;
     ContentPlaceHolder cph = (ContentPlaceHolder)this.Master.FindControl("cphMain");
     if ((cph != null) &amp;&amp; (uc != null))
     {
          cph.Controls.Add(uc);
     }
</code></pre>

<p>Thanks!</p>
