Styles.Render in MVC4

后端 未结 8 1317
粉色の甜心
粉色の甜心 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 07:58

    I did all things necessary to add bundling to an MVC 3 web (I'm new to the existing solution). Styles.Render didn't work for me. I finally discovered I was simply missing a colon. In a master page: <%: Styles.Render("~/Content/Css") %> I'm still confused about why (on the same page) <% Html.RenderPartial("LogOnUserControl"); %> works without the colon.

提交回复
热议问题