InnerHtml empty in HtmlContainerControl ASP.NET
<p>I have a rather specific question, that I couldn't find googling.</p>

<p>I have a div with a runat server like this:</p>

<pre><code>&lt;div id="Menu" runat="server"&gt;

&lt;!--code--&gt;
     &lt;div&gt;&lt;%= SomeValue %&gt;&lt;/div&gt;
&lt;!--code--&gt;

&lt;/div&gt;
</code></pre>

<p>The problem is that I need the InnerHtml of the element before the page finishes it's life cicle (to globalize it), but when I add the <code>&lt;%=%&gt;</code> the InnerHtml property comes back as <code>""</code> (if I remove it, it works fine).</p>

<p>For example:</p>

<p>1</p>

<pre><code>&lt;div id="Menu" runat="server"&gt;
  &lt;span&gt;Hi!&lt;/span&gt;
&lt;/div&gt;
//Menu.InnerHtml == "&lt;span&gt;Hi!&lt;/span&gt;";
</code></pre>

<p>2</p>

<pre><code>&lt;div id="Menu" runat="server"&gt;
  &lt;span&gt;Hi!&lt;/span&gt;
  &lt;div&gt;&lt;%= SomeValue %&gt;&lt;/div&gt;
&lt;/div&gt;
//Menu.InnerHtml == "";
</code></pre>

<p>Is there a way to have the InnerHtml and print <code>SomeValue</code> at the same time?</p>

<p>I guess can get around this some other way and this isn't really a good option, but I am dealing with existing code.</p>

<p>Thanks!</p>
