Injecting content into specific sections from a partial view ASP.NET MVC 3 with Razor View Engine

后端 未结 24 1895
无人共我
无人共我 2020-11-22 06:13

I have this section defined in my _Layout.cshtml

@RenderSection(\"Scripts\", false)

I can easily use it from a view:

24条回答
  •  逝去的感伤
    2020-11-22 06:50

    I had this issue today. I'll add a workaround that uses //you can actually just straight call your partial view script living in an external file - I just prefer having an initialization method :)

    Code above is an excerpt from a quick post I made about this question.

提交回复
热议问题