views:

926

answers:

2

Is there a way to stop Visual Studio 2008 from checking whether css classes exist when editing pages and user controls? It seems ridiculous to put dummy stylesheets on every single user control.

+2  A: 

Yes there is a way. Go to Tools>Options->Text Editor->CSS->Css Specific

There is an option fgroup here called Errors with 3 check boxes.

  • Detect Errors

  • Detect Unknown Properties

  • Detect Invalid Values

Hope this Helps,

Andrew :-)

REA_ANDREW
To make it quicker to turn on an off, instead of going through the menu also. You could record a macro to quickly turn on and off.
REA_ANDREW
Hi, sorry this simply doesn't work for me. I still have squiggly lines under all of my css class names.
cbp
Ok, then aswell, try going into the HTML node which is directly after the CSS node, in the same settings, expand and hit validation, change the target and try that. I cannot guarantee you can turn off the squiggly lines, but it will suppress the warnings and errors
REA_ANDREW
+4  A: 

The only way to disable it is to turn off HTML Validation:

Tools > Options > Text Editor > HTML > Validation

Uncheck the "Show Errors" check box.

Freyday