Prevent Visual Studio 2008 from rewriting inline code?
When writing inline code in an .aspx file and some lines down closing a statement with <% } %>
, Visual Studio tries to be开发者_StackOverflow nice but messes it up by rewriting it all. Is there any way of turning this rewriting off, but only for inline code?
alt text http://img338.imageshack.us/img338/8029/autoformatting.png
This setting will however have effect on all C# code, not just inline code.
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.
精彩评论