星空网 > 软件开发 > ASP.net

在_Layout模版中使用@Styles.Render()没有效果

刚才有测试一个功能,就是在_Layout母版中使用了@Styles.Render()时行Render样式文件,所有在此母版下的视图均没有应用到样式,没有效果。
是什么原因?


经查证资料,原来Insus.NET在Global.asax文档中,配置了BundleTable.EnableOptimizations = true;

 在_Layout模版中使用@Styles.Render()没有效果

 

当设为true之后,脚本/风格渲染方法优化为关闭。

我们需要设置为:
BundleTable.EnableOptimizations = false;

一切正常!





原标题:在_Layout模版中使用@Styles.Render()没有效果

关键词:

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

跨境电商行业职业发展:https://www.goluckyvip.com/tag/35788.html
跨境电商行业职业规划:https://www.goluckyvip.com/tag/35789.html
跨境电商行业专家:https://www.goluckyvip.com/tag/35790.html
跨境电商行业资讯:https://www.goluckyvip.com/tag/35791.html
跨境电商好不好:https://www.goluckyvip.com/tag/35792.html
跨境电商好的培训:https://www.goluckyvip.com/tag/35793.html
去日本入住酒店,东西随意用却有一个特殊“要:https://www.vstour.cn/a/411241.html
中国有哪些著名的酒店品牌。:https://www.vstour.cn/a/411242.html
相关文章
我的浏览记录
最新相关资讯
海外公司注册 | 跨境电商服务平台 | 深圳旅行社 | 东南亚物流