我试图显示一个组合和一个文本字段。该组合显示OK,并从模型中获取值和列表。还有6个其他连击,都可以正常工作。但是SalesPrice是唯一的“文本”字段,并且为空。<div class="form-group"> @Html.LabelFor(model => model.PriceSourceSelected, htmlAttributes: new { @class = "control-label col-md-2" }) <div class="col-md-10"> @Html.DropDownListFor(m => m.PriceSourceSelected, Model.PriceSourceList, "Seleccione Origen", htmlAttributes: new { @class = "form-control" }) @Html.ValidationMessageFor(model => model.PriceSourceSelected, "", new { @class = "text-danger" }) </div></div><div class="form-group"> @Html.LabelFor(model => model.SalesPrice, htmlAttributes: new { @class = "control-label col-md-2" }) <div class="col-md-10"> @Html.EditorFor(model => model.SalesPrice, new { htmlAttributes = new { @class = "form-control numericOnly", @type = "number" } }) @Html.ValidationMessageFor(model => model.SalesPrice, "", new { @class = "text-danger" }) </div></div>在调试视图时检查局部变量我可以看到SalesPrice具有正确的值:
2 回答
慕的地6264312
TA贡献1817条经验 获得超6个赞
我解决了在Web.Config中更改uiCulture的问题
<system.web> <globalization uiCulture="en" culture="en-US" />
- 2 回答
- 0 关注
- 140 浏览
添加回答
举报
0/150
提交
取消