Here is my setup in ASP.NET MVC 3:
Master Page –(RenderBody)-> Index View –(Html.Action)-> Partial View.
The Master Page has a @RenderSection and the Partial View has a @section block but the content isn’t being included on the Master Page. I can, however, put the @section block on the Index View and that works. Are multi-nested Sections not supported in MVC 3? I really don’t want to move the section block up a level but will if there is no other way.
And just FYI this particular RenderSection is at the bottom of the Master Page for including JavaScript blocks. If a partial view needs to execute some script it can include the @section block to keep everything organized.
Cheers!
You can’t use @section in a partial view. You can have nested layouts, but not partials.