Asp.net mvc 用于HtmlAttributes的MVC 5.2编辑器已停止工作

Asp.net mvc 用于HtmlAttributes的MVC 5.2编辑器已停止工作,asp.net-mvc,asp.net-mvc-5.2,Asp.net Mvc,Asp.net Mvc 5.2,我不知道发生了什么变化,但我的EditorFor helpers上的htmlAttributes突然停止了工作。标签仍然有效,但不是EditorFor。如果我将它们更改为textbox,则会添加属性/类 未添加的类: @Html.EditorFor(model => model.Address1, new { htmlAttributes = new { @class = "textboxXXLg k-textbox" } }) 添加了以下类: @Html.LabelFor(model

我不知道发生了什么变化,但我的EditorFor helpers上的htmlAttributes突然停止了工作。标签仍然有效,但不是EditorFor。如果我将它们更改为textbox,则会添加属性/类

未添加的类:

@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" })
我验证了我使用的是MVC5.2

<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-5.2.0.0" newVersion="5.2.0.0" />


非常感谢您的帮助。

我已经解决了这个问题。我添加了默认的剑道编辑器模板,它们与EditorFor冲突。不知道为什么,我没时间想清楚。一旦我移除剑道模板,他们又开始工作了

谢谢你,我快要发疯了。现在我可以继续了解它为什么不起作用了。现在的问题是如何以正确的方式修复此冲突。我最终要做的是将Kendo的编辑器模板重命名为nameKendo.cshtml(例如StringKendo.schtml),一切正常。如果我真的需要剑道模板,那么我会在指向剑道模板的模型属性上使用UIHint属性。通过这个技巧(重命名),我们可以避免冲突。有什么评论吗?