title: How do I declare a C# Web User Control but stop it from initializing?
body: <p>I have a C#/ASP.NET .aspx page that declares two controls that each represents the content of one tab.  I want a query string argument (e.g., ?tab=1) to determine which of the two controls is activated.  My problem is, they both go through the initialization events and populate their child controls, wasting CPU resources and slowing the response time.  Is it possible to deactivate them somehow so they don't go through any initialization?</p>
  
  <p>My .aspx page looks like this:</p>
  
  <pre><code>&lt;% if (TabId == 0)
     { %&gt;
  &lt;my:usercontroltabone id="ctrl1" runat="server" /&gt;
  &lt;% }
     else if (TabId == 1)
     { %&gt;
  &lt;my:usercontroltabtwo id="ctrl2" runat="server" /&gt;
  &lt;% } %&gt;
  </code></pre>
  
  <p>And that part works fine.  I assumed the that &lt;%'s would have meant the control wouldn't actually be declared and so wouldn't initialize, but that isn't so...</p>