如何从index.cshtml中的site.css访问元素 [英] How to access the elements from the site.css within the index.cshtml

查看:254
本文介绍了如何从index.cshtml中的site.css访问元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

现在我基本上在mvc 3 razior视图中位于index.cshtml.我试图在site.css和index.cshtml之间建立链接,以使我能够从index.cshtm中选择site.css中的元素.我该怎么办.

解决方案

在web.config的配置块中,您需要添加

 <  位置   路径  ="  > 
   <   system.web  > 
     <  授权 > 
       <  允许    ="   *" > 
     <  /authorization  > 
   <  /system.web  > 
 <  /位置 >  



参考: http://support.microsoft.com/kb/316871 [ 解决方案

In configuration block of web.config, you need to add

<location path="Content">
   <system.web>
     <authorization>
       <allow users="*"/>
     </authorization>
   </system.web>
 </location>



Ref:
http://support.microsoft.com/kb/316871[^]


这篇关于如何从index.cshtml中的site.css访问元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆