title: How to add user control on run time in ASP.NET?
body: <p>How do I add a user control on page load dynamically in ASP.NET?</p>
  
  <p>I have a div with <code>ID="contentData"</code> and few controls</p>
  
  <ul>
  <li>one.ascx</li>
  <li>two.ascx</li>
  <li>three.ascx</li>
  </ul>
  
  <p>Now I have created a page <code>default.aspx</code>, which may get parameters in query string, in one of the following ways: </p>
  
  <pre class="lang-none prettyprint-override"><code>default.aspx?val=one  
  default.aspx?val=two  
  default.aspx?val=three
  </code></pre>
  
  <p>I am taking the value from  </p>
  
  <pre><code>Request.QueryString["val"]
  </code></pre>
  
  <p>Now how do I load specific control in this?</p>
  
  <pre><code>&lt;div ID="controlData"&gt;&lt;/div&gt;
  </code></pre>