Styles.Render在MVC4 [英] Styles.Render in MVC4
本文介绍了Styles.Render在MVC4的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在 .NET MVC4
项目如何做 @ Styles.Render
和
我的意思是,在 @ Styles.Render(〜/内容/ CSS)
该文件是在调用?
I mean, in @Styles.Render("~/Content/css")
which file is it calling?
我没有一个文件或叫做CSS我的内容
文件夹中。
I dont have a file or a folder called "css" inside my Content
folder.
推荐答案
它调用包含在其中的 BundleConfig
类中声明该特定包中的文件 App_Start
文件夹中。
It's calling the files included in that particular bundle which is declared inside the BundleConfig
class in the App_Start
folder.
在特定情况下,@ Styles.Render到调用(〜/内容/ CSS)
呼吁〜/内容/的site.css。
In that particular case The call to @Styles.Render("~/Content/css")
is calling "~/Content/site.css".
bundles.Add(new StyleBundle("~/Content/css").Include("~/Content/site.css"));
这篇关于Styles.Render在MVC4的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文