After trying things for some time I have determined that these warning messages are generically tied to HTML validation, and do not have specific codes like Compiler Warnings. As such there is an all or nothing option to disable these warnings under Tools->Text Editor-> HTML-> Validation.
Old:
Here is something you might try. From ASP.NET:
<link href="/css/main2.css" rel="stylesheet" type="text/css" runat="server"
id="styleMain" visible="false" />
playing around with the root path in href seems to make a difference:
<link href='~/css/main2.css' rel='stylesheet' type='text/css' />
Well I had an interesting time changing the schema for the validation rules (found here):
C:\Program Files\Microsoft Visual Studio 9.0\Common7\Packages\schemas\html
Using xhtml (1.0 transitional) validation I edited xhtml_trasitional.xsd and removed cellspacing as a valid attribute of table. When I restarted VS it flagged cellspacing as an invalid attribute. Maybe there is a solution in there. Although those errors say "Validiation (XHTML 1.0 TRANSITIONAL)" in front of them, as opposed to "class or css class is not defined" which may imply it is coming from somewhere else.