title: separate numbers by comma with asp.net mvc
body: <p>I am working on an MVC2 appication. </p>
  
  <p>I use data annotations to validate data (both client side and server side). I have several fields in my model that only allows decimal values. As soon as a user types a decimal values I want it to be converted to comma seperated more readable format. For instance 1200 should be formatted to 1,200 while 500 should stay as it is. </p>
  
  <p>Here is my model:</p>
  
  <pre><code>public virtual GrossFee? Fee { get; set; }
  </code></pre>
  
  <p>And here is how it is on the view:</p>
  
  <pre><code>%: Html.TextBoxFor(model =&gt; model.GrossFee)%&gt;
  </code></pre>
  
  <p>Any ideas regarding this will be highly appreciated. </p>
  
  <p>Thanks!</p>