MVC3 Decimal truncated to 2 decimal places on edit

前端 未结 3 1494
一向
一向 2020-12-05 02:48

I\'m running MVC3 with Razor and noticed that decimal values are truncated to 2 decimal places when in edit mode. I\'ve managed to get round it by annotating my property wit

3条回答
  •  盖世英雄少女心
    2020-12-05 03:13

    If you don't need the functionality of the 'EditorFor' HtmlHelper, you can simply swap it out for the 'TextBoxFor' and it shouldn't truncate your decimal value...

提交回复
热议问题