title: AutoPostBack and HTML encoding
body: <p>I'm having trouble with HTML characters in a text field and an AutoPostBack.</p>
  
  <p>I have something like the below:</p>
  
  <pre><code>&lt;asp:FormView ID="FormView1" runat="server" 
                DataKeyNames="ID" DataSourceID="SqlDataSource4"
                ForeColor="#333333" DefaultMode="Edit" 
                HorizontalAlign="Center" Font-Size="X-Small"
                Width="100%" OnDataBound="FormView1_DataBound"&gt;
        &lt;asp:TextBox ID="fooTextBox" runat="server" 
                     Width="100%" Rows="4" TextMode="MultiLine"
                     CssClass="tr4" Text='&lt;%# Bind("foo") %&gt;' AutoPostBack="true"
                     OnTextChanged="ChangedRecord" /&gt;
  &lt;/asp:FormView&gt;
  </code></pre>
  
  <p>Now when a user enters into the textbox something like </p>
  
  <blockquote>
    <p>&lt; foo></p>
  </blockquote>
  
  <p>it will throw an error 500 due to the HTML characters in the text field.</p>
  
  <p>How can I manage this before it is sent via the AutoPostBack?</p>