ASP.NET - Passing a C# variable to HTML
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/1531586/why-works-in-one-situation-but-not-in-another">Why &lt;%= %&gt; works in one situation but not in another</a>  </p>
</blockquote>



<p>I am trying to pass variables declared in C# to html.  The variables have all been declared as public in the code-behind.</p>

<p>This is the HTML code I am using:</p>

<pre><code>&lt;asp:TextBox ID="TextBoxChildID" Text='&lt;%= Child_ID %&gt;' runat="server" Enabled="false"&gt;&lt;/asp:TextBox&gt;
</code></pre>

<p>The problem is that when the page loads, the text '&lt;%= Child_ID %>' appears in the textbox instead of the value in the variable.</p>

<p>What is wrong please?</p>
