Is there a way to enable auto-formatting of C # code embedded inside HTML when creating an MVC application?
It seems to be using C # text editor settings for inline code, but I don't want to use the same formatting inside the HTML file as regular code files.
For example, if I write <% somecodehere { %> , then some HTML between them, and then I put <% } %> at the end, Visual Studio will automatically reformat the code:
<% using (Html.BeginForm()) {%> ... <% }%>
For MVC code, I think it looks as neat as this
<% using (Html.BeginForm()){ %> ... <% } %>
But I don’t see how to change this without messing up the formatting for regular code files.
Øyvind Bråthen
source share