Reputation: 1658
I have rendering a section in the bottom master layout. This is typically section to render javascript at the bottom of the page when it renders. Defining that section in View and _partial views. When page renders, it renders section from page view but not from the _partial view.
How it is possible to render a section defined in _partial view to main layout?
Upvotes: 13
Views: 14891
Reputation: 17470
You can use Html.RenderAction
/Html.Action
or use helpers like demonstrated here: https://stackoverflow.com/a/5433722/290343
Upvotes: 3