?
Solved

Visual Studio automatically entering double quotes on style attribute when typing

Posted on 2007-11-14
2
Medium Priority
?
1,008 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 2000 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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.
Suggested Courses

777 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