Here's a summary of adding EditorTemplate . In short, you need to create the EditorTemplates directory in Views / Shared, and you must create a view with the same name as the model for which you want to create an editor.
Remember that the EditorTemplate for the model is used when calling Html.EditorFor with an object of this model as an argument. Of course, you should use them to provide editing capabilities - if you want to create something that should only display data, use the same method to create the DisplayTemplate (create the DisplayTemplates directory). DisplayTemplate mapped to an Html.DisplayFor call with an object of this model as an argument.
source share