title: The forecolor of textbox is reset when I change its backcolor, vice versa (with PostBack)
body: <p>I have one main textbox with multiline textmode, and another two textboxes with color textmode, one is to change the text-color and the other one to change the background-color of the main textbox.</p>
  
  <p>The problem is that if I change the background color after changing the text color, the text color will be overridden by black color (I guess this is the default color), or if I change the text color after changing the background color, the background color will be overridden by white color (the default color I guess).</p>
  
  <p>I know the textbox value is posted with PostBack request, but I thought ViewState should store the control information for textbox. It still does not if I enable ViewState for the main textbox explicitly.</p>
  
  <p>Somehow I can fix this problem. But, <strong>why does it behave like this?</strong></p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I have checked this resource: <a href="http://www.c-sharpcorner.com/UploadFile/ee01e6/viewstate-for-textbox-in-Asp-Net/" rel="nofollow">http://www.c-sharpcorner.com/UploadFile/ee01e6/viewstate-for-textbox-in-Asp-Net/</a></p>
  
  <p>When I use radiobuttons, it works. If I use the textbox as the color-picker, then it does not work.</p>
  
  <p>Is this a bug of textbox when used with TextMode set to Color??</p>
  
  <p>Here is the main textbox:</p>
  
  <pre><code>    &lt;asp:TextBox ID="txt_Editor"
          TextMode="MultiLine"
          Columns="50" Rows="10"
          EnableViewState="true"
          runat="server"&gt;&lt;/asp:TextBox&gt;
  </code></pre>
  
  <p>Here are the two:</p>
  
  <pre><code>    &lt;div class="text-muted"&gt;Color Options:&lt;/div&gt;
      Text-color:
      &lt;asp:TextBox ID="txt_TextColor" 
          AutoPostBack="true" TextMode="Color"
          Text="#000000" runat="server" OnTextChanged="txt_TextColor_TextChanged"&gt;
      &lt;/asp:TextBox&gt;
  
      Background-color:
      &lt;asp:TextBox ID="txt_BackColor"
          TextMode="Color" AutoPostBack="true"
          Text="#FFFFFF" runat="server" OnTextChanged="txt_BackColor_TextChanged"&gt;&lt;/asp:TextBox&gt;
  </code></pre>
  
  <p>Here is the related part in the CodeBehind file, whenever a color is chosen the colors of the main textbox should be updated accordingly:</p>
  
  <pre><code>    protected void txt_TextColor_TextChanged(object sender, EventArgs e)
      {
          txt_Editor.ForeColor = Color.FromName(txt_TextColor.Text);
      }
  
      protected void txt_BackColor_TextChanged(object sender, EventArgs e)
      {
          txt_Editor.BackColor = Color.FromName(txt_BackColor.Text);
      }
  </code></pre>