Link to home
Start Free TrialLog in
Avatar of Valimai
Valimai

asked on

Visual Studio automatically entering double quotes on style attribute when typing

hi there,

Visual Studio 2005.

when i am typing away in my aspx file and start typing any attribute, like Class="MyClass", I have to type the double quotes. But when i type the STYLE tag, style="text-align: right;", the quotes are auto inserted.

This is most annoying because it is in consistent. I end up typing STYLE=""test-align: right;"".
To replicate, type the following in VS source mode.
<div style=
it should look like this after your type the equals sign
<div style=""

But since I am used to having to type the double quotes for every other attribute except for style,  *rant* :), I end up over double-quoting.
Is there a way to stop VS from doing this either by
1. Stop the auto quotes from being generated on the STYEL attribute.
or
2. Able to set all other attributes to automatically generate double quotes (i think this would be prefered).

cheers
ASKER CERTIFIED SOLUTION
Avatar of Jorge Paulino
Jorge Paulino
Flag of Portugal image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Valimai
Valimai

ASKER

Thanks, option 2 can be enabled by
Tools -> Options -> Text Editor -> HTML -> Format
turn on - "Insert attribute value quotes when typing"

also, found a different option i changed as when i copy and paste html, the IDs of the controls are made unique, quite annoying.
Tools -> Options -> Text Editor -> HTML -> Miscellaneous
turn off - "Auto ID elements on paste in source view"