I want to run a code on each page of my website, before the page is displayed.
In webforms i used to place this code in the page_load of the master page.
But Where could i do it in MVC?
I want to run a code on each page of my website, before the
Share
You can always create a base class for your controllers, override the OnActionExecuting method and put the code you need to run there.
Example