1

I have an ASP.NET user control that references some CSS classes. In the Error List pane I get the following warning for each CSS reference: The class or CssClass value is not defined. Is there any way around this?

1
  • No, there's no way around it that I'm aware of. Commented Nov 24, 2009 at 13:05

1 Answer 1

2

Use this in your user controls. This will trick VS into thinking there is a stylesheet while avoiding at the same time it being included as a duplicate.

<% if (false) { %>
    <link href="Content/Css/Styles.css" rel="Stylesheet" type="text/css" />
<% } %>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.