Is there an event that is fired prior to an action method being called in a controller? I have some common ‘page control’ specific variables that are passed from client to server in nearly all acton methods and would benefit from a hanlder that would allow me to retrieve these values and map them to my own data structures before the action method is executed. Kind of like a viewstate mechanism.
J.
You could override the
OnActionExecutingmethod. Another more reusable solution is to write a custom action filter and then decorate your controllers/actions with it or even declare it as a global action filter so that it applies to all the controllers and actions in the application.