【发布时间】:2015-02-11 10:45:21
【问题描述】:
我不确定发生了什么变化,但我的 EditorFor 助手上的 htmlAttributes 突然停止工作。标签仍然有效,但 EditorFor 无效。如果我将它们更改为 TextBoxFor 则添加属性/类。
未添加的类:
@Html.EditorFor(model => model.Address1, new { htmlAttributes = new { @class = "textboxXXLg k-textbox" } })
类已添加:
@Html.LabelFor(model => model.Address1, htmlAttributes: new { @class = "control-label ctrl-label required" })
我确认我使用的是 MVC 5.2。
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-5.2.0.0" newVersion="5.2.0.0" />
非常感谢任何帮助。
【问题讨论】:
标签: asp.net-mvc asp.net-mvc-5.2