我正在使用EditorFor()帮助器在我的视图中呈现编辑模板,我想调用此模板中的displayFor()来渲染display模板.
喜欢这个
这是在/Shared/EditorTemplates/Client.ascx中
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<BusinessNext.Models.Ef.Client>" %> <%: Html.displayFor(client=>client) %>
在displayFor模板中,我渲染出客户端的属性. displayFor模板在从其他地方调用时工作得非常好,但是从EditorFor模板调用它不会渲染任何东西.似乎displayFor()调用实际上从未实际到达displayFor模板.
解决方法
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。