title: Asp.net: conditional loading of user controls fails
body: <p>Hello (sorry for the poor title)</p>
  
  <p>I have a user control which loads different additional user controls based on some conditions like this:</p>
  
  <pre><code>&lt;%@ Control Language="C#" AutoEventWireup="true" CodeFile="SubPage.ascx.cs" Inherits="SubPage" %&gt;
  &lt;%@ Register Src="&lt;srcA&gt;" TagName="A" TagPrefix="CTRL" %&gt;
  &lt;%@ Register Src="&gt;srcB&gt;" TagName="B" TagPrefix="CTRL" %&gt;
  
  &lt;% if (someValue == 1) { %&gt;
      Loading user control A..
      &lt;CTRL:A runat="server" /&gt;
  &lt;% } else { %&gt;
      Loading user control B..
      &lt;CTRL:B runat="server" /&gt;
  &lt;% } %&gt;
  </code></pre>
  
  <p>The result will look correct; the expected content is displayed. But I noticed that even though <em>someValue != 1</em> and control B is displayed, control A is still loaded behind the scenes (page load is called).</p>
  
  <p>Why is this? And what would be a better approach? Thanks.</p>