title: How to modify style for an asp:textbox in codebehind?
body: <p>I am trying to set the style of an asp:TextBox in codebehind, the textbox is style is set initially to
   <code>style="display:none"</code> 
  when I set the dispaly to block in codebehind the textbox appears for a moment and then it's gone. I don't know what this problem is, when it's done in javascript it works fine</p>
  
  <p>Here is the code:</p>
  
  <p>asp.net code:</p>
  
  <p><code>&lt;asp:TextBox ID="txtError" style="display:none"  runat="server" ReadOnly="True" Width="95%"&gt;&lt;/asp:TextBox&gt;</code></p>
  
  <p>codebehind:</p>
  
  <pre><code>txtError.Style["display"] = "block";
  </code></pre>
  
  <p>Am I doing anything wrong? Thanks in advance.</p>