Html.EditorFor retrieve null in decimals ASP.NET MVC

半世苍凉 提交于 2019-12-25 08:30:59

问题


I have a problem when retrieving a decimal data in my view. It occurs using Google Chrome and M.Edge, but with I.Explorer and Firefox is not happening.

This is my model:

public Nullable<decimal> TA_RATE_CARD_COST { get; set; }

This is the view:

@Html.EditorFor(m => m.TA_RATE_CARD_COST, "DecimalNullable")

When the value stored in the database is for example 500,54 the view does not retrieve the value, the EditorFor is empty.

If the value stored is 500 the data is retrieved correctly, like I show you.

Why is this happening? I remember with a old version of Chrome this works correctly. I'd appreciate any help. Thanks in advance.

来源:https://stackoverflow.com/questions/42364461/html-editorfor-retrieve-null-in-decimals-asp-net-mvc

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!