Basically I have a webpage structure where common parts of the page (header, side bar, etc) are generated in a separate controller filled with child actions outputting partial views. I then call these actions (using RenderAction()) from the layout page of the website.
So (if I'm right in saying this), There are multiple internal mvc pipelines (header/sidebar internal requests) including the original request pipeline to for the specific webpage. How/Where can I initialize some data from the original pipeline request and have that data accessible from the other internal mvc pipeline requests?
Summary of what I want to accomplish (with example)
- Request for website comes in.
- MVC starts pipeline for "Home" controller, "index" action.
- Before the Action gets executed, some data needs to be created that can later be accessible.
- From the layout page, several "RenderAction" Methods get executed creating sub pipelines for interal requests (e.g. "Shell" controller, "DisplayHeaderBar" action
- "DisplayHeaderBar" needs to access some data that was set in step 3 before rendering partial view
Hopefully this makes sense...