Styles.Render in MVC4

后端 未结 8 1268
粉色の甜心
粉色の甜心 2020-12-07 07:10

In a .NET MVC4 project how does @Styles.Render works?

I mean, in @Styles.Render(\"~/Content/css\") which file is it calling?

相关标签:
8条回答
  • 2020-12-07 08:03

    It's calling the files included in that particular bundle which is declared inside the BundleConfig class in the App_Start folder.

    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"));
    
    0 讨论(0)
  • 2020-12-07 08:10

    src="@url.content("~/Folderpath/*.css")" should render styles

    0 讨论(0)
提交回复
热议问题