gpt4 book ai didi

asp.net-mvc - MVC EditorFor 在另一个 EditorFor 中

转载 作者:行者123 更新时间:2023-12-04 21:51:15 25 4
gpt4 key购买 nike

我有一个用于模型角色的 EditorFor 模板,如下所示。我也有用于 Date 的 EditorFor,当我直接从 View 使用 EditorFor 时它工作正常,但是当我在编辑器中使用 EditoFor 时它不起作用。任何的想法?

Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl[ucsrManagementSystem.Models.ContactsInMailingListsViewModel]"

Html.EditorFor(m => m.IsInMainlingList)
Html.EditorFor(m => m.Id)
Html.EditorFor(m => m.Name)
Html.EditorFor(m => m.EndDate)//This is not showing Date's Editor Template when inside another EditorFor

最佳答案

它对我也不起作用;我假设它是某种反递归保护。

如果您将“EditorFor”的外部调用改为“Partial”——甚至指向同一个 .cshtml 文件——内部“EditorFor”将起作用。

关于asp.net-mvc - MVC EditorFor 在另一个 EditorFor 中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4026784/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com