Solved

Visual Studio automatically entering double quotes on style attribute when typing

Posted on 2007-11-14
2
1,001 Views
Last Modified: 2013-11-26
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
0
Comment
Question by:Valimai
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 48

Accepted Solution

by:
jpaulino earned 500 total points
ID: 20284563
You can go to Tools -> Options -> Text Editor -> HTML -> Format and select the Tag Specific Options. Then in the Client HTML Tags you can make the changes you want (add, change, delete)
0
 
LVL 1

Author Comment

by:Valimai
ID: 20284676
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"
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

689 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question