MVCContrib PortableArea 中的 Html.EditorFor
我试图在可移植区域中使用 Html.EditorFor (即创建和编辑使用相同的表单),但它似乎不起作用(尽管它不在可移植区域中也很好)。在页面中,我只有:
<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<MySite.Models.DocumentType>" %>
...
<%= Html.EditorFor(model => model, new { }) %>
然后在“EditorTemplates”子文件夹中,我有我的编辑器代码
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<MySite.Models.DocumentType>" %>
...
但是,它似乎没有使用它来呈现编辑器。
I am trying to use Html.EditorFor in a Portable Area (i.e. so create and edit use the same form), but it doesn't seem to working (fine when it is not in the Portable Area though). In the page, I just have:
<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<MySite.Models.DocumentType>" %>
...
<%= Html.EditorFor(model => model, new { }) %>
Then in the 'EditorTemplates' sub folder I have my editor code
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<MySite.Models.DocumentType>" %>
...
However, it doesn't seem to be using it to render the editor.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论