Viewing CSS Intellisense in partial views and Cont

2019-06-26 05:17发布

I am trying to figure out how to get Intellisense for CSS to render when in a partial view or a content page. Of course I don't want it to render a runtime, as the css comes from the masterpage.

I found this trick....

<%if (false) {%> <link rel="Stylesheet" href="styles.css"/> <%}%>

But is there a better option?

1条回答
够拽才男人
2楼-- · 2019-06-26 05:55

Same idea, but no code nuggets and language independent:

<link rel="Stylesheet" href="styles.css" runat="server" visible="false" />

查看更多
登录 后发表回答