I find myself constantly pressing ctrl-z to undo the automatic formatting that happens in templates. For example Resharper would like to format a foreach loop like this:
<%
foreach (var product in Model.Items)
{ %>
<li><%= product.Name %></li>
<% } %>
This is fine in c# code files but it just seems messy in templates.
I would prefer to format it like this
<% foreach (var product in Model.Items) { %>
<li><%= product.Name %></li>
<% } %>
Open Visual Studio
Goto
Resharper > Options… > Langauges > C# > Formatting Style > Braces Layout > Other
Change to “At end of line (no space)”
Note this will affect your C# as well.
It is a bit annoying that you cant specify a different code sytle for you aspx pages since its often you do want something differnt.