Solved

Visual Studio automatically entering double quotes on style attribute when typing

Posted on 2007-11-14
2
983 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
2 Comments
 
LVL 48

Accepted Solution

by:
jpaulino earned 500 total points
Comment Utility
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
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

772 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now