views:

50

answers:

1

When I drag a Label control to my document, I get the following code :

<asp:Label ID="Label1" runat="server" text="Label"></asp:Label>

I prefer my code to look like the following instead :

<asp:Label ID="Label1" runat="server" Text="Label" />

How can I get .NET to do this by default? I looked in Tools -> Options -> Text Editor, where you'd expect to find it, but I couldn't find anything relevant there.

+1  A: 

Go back to Tools|Options|Text Editor, and expand the HTML node in the tree. Go to the Format node, and the click the Tag-Specific Options button. In the dialog that opens up, expand the ASP.NET controls tree and find asp:Label. You can set how you want the closing tag in the selector at the top on the right. alt text

PhilPursglove