开发者

Referencing CSS from a User Control

开发者 https://www.devze.com 2022-12-12 14:45 出处:网络
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 CssCl开发者_JAVA技巧ass value is not defined. I

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 CssCl开发者_JAVA技巧ass value is not defined. Is there any way around this?


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" />
<% } %>
0

精彩评论

暂无评论...
验证码 换一张
取 消