RenderSection not working inside Partial View in ASP.NET MVC3

前端 未结 1 1891
自闭症患者
自闭症患者 2021-02-20 10:42

In my ASP.NET MVC3 project I have a standard _Layout.cshtml generated by Visual Studio 2010 and after closing my tag, I place a Rend

相关标签:
1条回答
  • 2021-02-20 11:21

    It is not possible to set an @section in the layout from a partial view. As a workaround you could instead call an action which renders the necessary <script> and HTML - although this is not very elegant.

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