Returning a Built-In EditorTemplate as a PartialView in an Action
Is there a way to return a built-in editor template - not a custom editor template - as a PartialView in an action?
I'd like to do something like this:
return PartialView("Collection", person.Children);
Thanks in advance
AFAIK there is no way to do this from a controller action. You could return a custom partial view:
that will invoke the editor template:
@model IEnumerable<Foo> @Html.EditorForModel()