How to create custom editor/display templates in ASP.NET MVC 3?

asp.net Mvc-3TemplatesEditortemplates

asp.net Mvc-3 Problem Overview


I would like to make custom editor templates for different data types in ASP.NET MVC (to use with Html.EditorFor()), including rewriting the existing templates. The ultimate goal is to create a mini-framework where each editor supports javascript notifications about being changed, and I can show a message to the user that there are unsaved changes in the page. (Maybe there's something existing already?)

I can find many questions pertaining to problems with such templates, but nowhere can I find a tutorial or manual on creating them. Where do they go? Is there any special syntax? How does a template get selected? What information is available in the template and how do I access it? Etc.

So - where can I find out all about these templates?

asp.net Mvc-3 Solutions


Solution 1 - asp.net Mvc-3

Check and download ASP.NET MVC 3 Futures on http://aspnet.codeplex.com/releases/view/58781 and see how the default source code looks. Note: this works for MVC 4 as well.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionVilx-View Question on Stackoverflow
Solution 1 - asp.net Mvc-3GerardView Answer on Stackoverflow