Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法将内置编辑器模板(而不是自定义编辑器模板)作为操作中的 PartialView 返回?
我想做这样的事情:
return PartialView("Collection", person.Children);
提前致谢
AFAIK 无法从控制器操作中执行此操作。您可以返回自定义局部视图:
return PartialView(person.Children);
这将调用编辑器模板:
@model IEnumerable<Foo> @Html.EditorForModel()