Using Visual Studio 2012 / MVC 4
When you create a controller in VS, you get the option to have VS automatically generate CRUD templates for your controller, is it possible to modify these templates or even create your own templates? As every time these templates are created I need to make minor changes to the code it generates, example
this is the code VS generates for my edit template
<div class="editor-label">
@Html.LabelFor(model => model.Title)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.Title)
@Html.ValidationMessageFor(model => model.Title)
</div>
but I have to change these evey time to suit my layout, to something like
<section>
@Html.LabelFor(model => model.Title)
<div>
@Html.EditorFor(model => model.Title)
@Html.ValidationMessageFor(model => model.Title)
</div>
</Section>
See the comment from Omar for the answer