Visual Studio HTML/ASPX editor can save you some time if you enable option Tools | Options... | Text Editor | HTML | Format | Insert attribute value quotes when typing. When this option is enabled, once you type a name of an attribute and following "=" symbol, Visual Studio automatically inserts a pair of quotes and invokes IntelliSense menu. After that you need only to select an attribute value from the menu and hit the Enter button. It's another nice timesaver.
In my environment, this doesn't work for the class attribute on HtmlControls or for the CssClass attribute on WebControls. Has anyone else had this problem?
Mark Hildreth 2/5/2008 12:23:31 AM
Are you talking about IntelliSense menu or about quotes?
kostya.ly 2/6/2008 12:21:40 AM
Just the quotes. I don't have any css classes defined in files that VS would be aware of (I'm using a mater page from a project in a parent folder) so there should be no intellisense menu (and there isn't).
Mark Hildreth 2/6/2008 1:58:26 AM
Does quotes work for all other attributes?
kostya.ly 2/6/2008 2:22:22 PM
Yep.
Mark Hildreth 2/7/2008 7:00:26 PM
"In my environment, this doesn't work for the class attribute on HtmlControls or for the CssClass attribute on WebControls. Has anyone else had this problem?" You need to install this update "VS 2008 Web Development Hot-Fix Roll-Up Available". You can find out more about this update here http://weblogs.asp.net/scottgu/archive/2008/02/08/vs-2008-web-development-hot-fix-roll-up-available.aspx
Sergey P. 2/10/2008 2:29:05 AM