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

别说谁变了你拦得住时间么 提交于 2020-01-14 12:34:23

问题


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:


Same idea, but no code nuggets and language independent:

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



来源:https://stackoverflow.com/questions/4009040/viewing-css-intellisense-in-partial-views-and-content-pages-visual-studio-2010

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!