简体   繁体   English

在部分视图和内容页面中查看CSS Intellisense - Visual Studio 2010?

[英]Viewing CSS Intellisense in partial views and Content pages - Visual Studio 2010?

I am trying to figure out how to get Intellisense for CSS to render when in a partial view or a content page. 我试图弄清楚如何在局部视图或内容页面中获取CSS的Intellisense渲染。 Of course I don't want it to render a runtime, as the css comes from the masterpage. 当然我不希望它呈现运行时,因为css来自母版页。

I found this trick.... 我找到了这个技巧....

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

But is there a better option? 但是有更好的选择吗?

同样的想法,但没有代码块和语言独立:

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM