Conditional compile in .aspx files
<p>I need the the .ASPX file to behave differently based on a conditional compilation symbol.</p>

<p>Let's say as an easy example:</p>

<pre><code>&lt;%@ Control Language="C#" AutoEventWireup="true" (...) %&gt;
&lt;% #ifdef DEBUG %&gt;
     &lt;asp:SomeDebugControlHere runat="server"/&gt;
     .. well .. a LOT of code here
&lt;% #else %&gt;
    &lt;asp:SomeReleaseControlHere runat="server"/&gt;
    .. and a LOT of other code here
&lt;% #endif %&gt;
</code></pre>

<p><strong>Later Edit</strong>: a few more clarifications. The problem is that the class <em>SomeDebugControlHere</em> is not even defined in the release build (it's way more complicated in real-life, but bear with this example). So in the page.aspx.designer.cs I need to get this in the debug build:</p>

<pre><code>/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// &lt;/remarks&gt;
protected global::System.Web.UI.SomeDebugControlHere myControl
</code></pre>

<p>and this in the release build: (and never both)</p>

<pre><code>/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// &lt;/remarks&gt;
protected global::System.Web.UI.SomeReleaseControlHere myControl
</code></pre>

<p>Obviously I need the mark-up in the ASPX file to be different, but I need the designer.cs file to be modified as well to incorporate the new objects/classes. </p>

<p>I'm just hoping somebody knows of a clever way of doing this either by some control inheritance, anything that would allow me to specify different control classes depending on compilation build settings.</p>
