我试图显示一个组合和一个文本字段。该组合显示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具有正确的值:
慕的地6264312
holdtom
相关分类