I have the following markup:
@Html.TextBoxFor(m => m.Items[i].Rate, new { @class = "form-control text-center Rate", @readonly = Model.PreTenderLockedDown, title = "Rate" })
When the Rate property is e.g. 12.45 in the db, the above TextBoxFor renders the number with a comma separator and not the period I want. Can I do anything outside of setting the language settings on IIS?
Try this:
web.config:
You can also apply this for the view where you want to force this setting:
Alternatively, you can override default behavior of TextBoxFor by using a custom helper method. I used a similar one for DropDownListFor in some of my projects as shown below:
Helper Method: