title: How to set DataFormatString to Textbox in ASP.NET?
body: <p>I am using <code>Datagrid</code> and I have bound column as below</p>
  
  <pre><code>&lt;asp:BoundColumn DataField="Salary" HeaderText="Salary" DataFormatString="{0:#,##0.00}"&gt;
  &lt;HeaderStyle HorizontalAlign="Center"&gt;&lt;/HeaderStyle&gt;
  &lt;ItemStyle HorizontalAlign="Center"&gt;&lt;/ItemStyle&gt;
  &lt;/asp:BoundColumn&gt;
  </code></pre>
  
  <p>I want to use above dataformat string for below <code>TextBox</code>.</p>
  
  <pre><code>&lt;asp:TextBox  DataFormatString="{0:#,##0.00}" ID="textbox1" runat="server" MaxLength="150"&gt;&lt;/asp:TextBox&gt;
  </code></pre>
  
  <p>If I try to set Dataformatstring to <code>TextBox</code> it is not working. How can I add dataformatstring to <code>TextBox</code> in ASP.NET or <strong>Javascript</strong> code in order to to same issue?</p>