Is it possible to change the way Resharper 4.5 code is formatted in aspx / ascx files?
I keep hitting ctrl-z to undo the automatic formatting that is happening in templates. For example, Resharper would like to format the foreach loop like this:
<%
foreach (var product in Model.Items)
{ %>
<li><%= product.Name %></li>
<% } %>
It's fine in C # code files, but it's just not useful in templates. I would rather format it this way
<% foreach (var product in Model.Items) { %>
<li><%= product.Name %></li>
<% } %>
+1
a source to share
3 answers
Open Visual Studio Go to Resharper> Options ...> Langauges> C #> Formatting Style> Bracket outline> Other
Change to "At the end of the line (no space)"
Note that this will affect your C # as well.
It is a little annoying that you cannot specify a different sytle code for your aspx pages, as often you need something different.
+4
a source to share