In the "Admin" area of my application, an object must be available in ViewData
on every page (for display in the Master template). I have already inherited from Controller
, so I cannot make a simple base class that handles it. What is a good solution of doing this when not using inheritance? An ActionFilter
seems interesting but I don't want to put it on every controller in the Admin area. I'm considering the following:
- Custom ControllerFactory that detects Area as well
- Application_BeginRequest(), though I have no knowledge on executing controller then.
Maybe you have a better solution?