When writing inline code in an .aspx file and some lines down closing a statement with <% } %>
, Visual Studio tries to be nice but messes it up by rewriting it all. Is there any way of turning this rewriting off, but only for inline code?
views:
105answers:
2
+3
A:
This setting will however have effect on all C# code, not just inline code.
Developer Art
2010-05-04 16:12:35
Thank you for locating the correct option to use. Had it been possible to affect only inline or aspx files it would've been perfect.
ciscoheat
2010-05-04 20:41:56
+1
A:
An alternate approach is to use CTRL-Z to undo the auto format operation. I happen to like this better than disabling the auto format altogether since VS's style works most of the time for me. I use CTRL-Z a lot when I am trying to line things up to make the code easier to read. It might not work for you, but it is an option.
Brian Gideon
2010-05-04 17:39:48
I agree that the formatting usually works so that's the way I'll go. Thanks.
ciscoheat
2010-05-04 20:40:43