in SQL server I have the field:
Price decimal (12,4)
in MVC model:
public decimal? Price { get; set; }
When I add or edit price 1.1234 it will save 1.1200 in the database. I want to save it as it is 1.1234
in SQL server I have the field:
Price decimal (12,4)
in MVC model:
public decimal? Price { get; set; }
When I add or edit price 1.1234 it will save 1.1200 in the database. I want to save it as it is 1.1234
you need to add like this -
dataItem.OtherFields["Price"].ToString("0.00000")
for more you can check out this