Html.EditorFor Global Template?

Is there a way to define a global template for Html.EditorFor helper?

I would like to change the markup that appears so that, for example, instead of rendering

<div class="editor-label"> <label .../> </div> <div class="editor-field"> <input .../> </div> 

It will display:

 <div> <div class="label"><label..../></div> <div class="field"><input..../></div> </div> 

This is for when I use Html.EditorFor with an instance of an object, not just for the property of the object.

+4
source share
1 answer

Brad Wilson wrote a blog series on asp.net mvc 2 templates. This one is related to your problem.

+3
source

Source: https://habr.com/ru/post/1312405/


All Articles