Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 74020

Decimal in form does not save, but db accepts same in put manually

$
0
0

in my form I have a field to edit/create a decimal value.

@Html.TextBoxFor(m => m.prijs)

In my model, this property is declared as:

[Column(TypeName = "decimal(18,2)")]
[Display(Name = "Prijs")]
public decimal? prijs { get; set; }

Whatever I put in there, 12.5 or 12,5 or even 12.00 or 12,00 does not get accepted. Only "12" passes OK When I input in the DB manually "12,5" it saves without problems.

When I view the data in another view, I see the decimal value correctly.

I'm going bananas.... What's happening here? thanks, James


Viewing all articles
Browse latest Browse all 74020

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>