I have this:
view - editing:
[code]
@Html.Label("Maandag")
@string.Format(new System.Globalization.CultureInfo("en-US"), "{0:0.##}", Model.Monday)
@Html.TextBox("Monday", Model.Monday.ToString(), new{@readonly = "readonly" })
@Html.ValidationMessageFor(model=> model.Monday)
[/code]
so I fill in the numbers as: 7.5, 8.5 but then in the Edit page the numbers will appear as comma's, like this: 7,5, 8,5.
And this is the Index page:
[code]
@Html.DisplayFor(modelItem => item.Monday) -
@Html.DisplayFor(modelItem => item.MondayHours)
[/code]
And this is the Edit page:
[code]
@Html.Label("Maandag")
@string.Format(new System.Globalization.CultureInfo("en-US"), "{0:0.##}", Model.Monday)
@Html.Editor("Monday",Model.Monday)
@Html.ValidationMessageFor(model=> model.Monday)
[/code]
Because if I go after the create page to the edit page the numbers are with comma's. So I have to fill in again the numbers, but then with dots.
THX for helping!!
Replies
Know the answer? Post it — somebody with the same question will find it here.