Reputation: 1667
Does any one know of a way to control how Visual Studio handles curly braces in Html view?
Type...
<% if (true) { %>
Then
<% { %>
And visual studio will auto format it as such.
<% if (true)
{ %>
<% } %>
Not a major issue but nest a few of these using foreach and it gets messy.
Upvotes: 1
Views: 1300
Reputation: 547
http://forums.asp.net/t/1478453.aspx
there is also a 'formatting' section in the jscript node. that was what my issue was.
Upvotes: 0
Reputation: 2751
Well its not really a sollution, but what i do is that i hit Ctrl+x to undo, and it will undo the formatting - there is not another way that i know off, other that changed it in all C# documents.
Upvotes: 1
Reputation: 1840
As the code is written in C#, it should be governed by the settings in tools | options | texteditor | c# | formatting.
Upvotes: 0
Reputation: 704
Take a look at tools -> options -> texteditor -> JScript -> Formatting!
Upvotes: 0