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

Answers


AFAIK there is no way to do this from a controller action. You could return a custom partial view:

return PartialView(person.Children);

that will invoke the editor template:

@model IEnumerable<Foo>
@Html.EditorForModel()

Need Your Help

ASP.NET modal popup, entirely from code behind?

c# asp.net ajaxcontroltoolkit

What I am trying to do is create a bit of reusable code that can write a modal popup, either through javascript or using the ajaxcontrol toolkit all from the code behind.

How to get Sunday, Monday … and Saturday String in the language of the android system?

android

I want to get Sunday, Monday, Tuesday, Wednesday, Thursday, Friday and Saturday String of the locale of the system. I have the code:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.