I am learning Asp.net MVC 3. Just wondering, is there any way to define a method that will be executed before executing any other methods of any controllers? That means it should work like the constructor of base "Controller" class.
This will include some common functionality like checking user session/if not logged in redirect to login page, otherwise set some common values from db that will be used everywhere in the application. I want to write them only once, don't want to call a method on each controller methods.
Regards