I have a <table/> in a ViewUserControl that I have given the tag a class=’tblRaised’ attribute/value. Visual Studio keeps underlying tblRaised and telling me – The class or CssClass is not defined.
Why is the intellisense engine trying to validate my CSS class names here? Anyone else run into this? Is this a bug? How would intellisense even know where my css file was in a ViewUserControl?
Because the styles are usually included in your view or master page, VS can’t find them in your ViewUserControl. If you add something like the following to your ViewUserControl you can get around the issue (and get intellisense) without including the CSS twice.
This will get the intellisense since it can find the stylesheet, but the use of if (false) actually prevents it from being included at runtime.