I am working on an MVC2 appication.
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.
Here is my model:
public virtual GrossFee? Fee { get; set; }
And here is how it is on the view:
%: Html.TextBoxFor(model => model.GrossFee)%>
Any ideas regarding this will be highly appreciated.
Thanks!