When does asp.net HTML encode elements?
<p>In my database, I have a text field that contains escaped data:</p>

<pre><code>"O&amp;#39;Neal"
</code></pre>

<p>I am trying to output it to my page like this:</p>

<pre><code>LastName.InnerText = DB.LastName;
</code></pre>

<p>However, this results in this HTML on my page:</p>

<pre><code>&lt;h2 id="LastName"&gt;O&amp;amp;#39;Neal&lt;/h2&gt;
</code></pre>

<p>What makes asp.net encode my HTML like this, and can I trust it to do this all the time?</p>
