I am developing a site in ASP.NET MVC 3.
The property
[DisplayName("Cost"), DisplayFormat(DataFormatString = "{0:F2}", ApplyFormatInEditMode = true)] public decimal Cost { get; set; }
View
@Html.EditorFor(x => x.Cost)
The view displays the cost as 1000.00 (for example). The problem is that validation requires a dot instead of a comma. How can I withdraw 1000.00 instead of 1000.00? Or cancel the check to accept a comma instead of a period?
Change I installed globalization in my web.config for sv-SE (Sweden).
Bridget the midget
source share