I need to use session in my MVC 3 web app like I used to do in my old ASP.NET web app. I need to save some values, and then access it from any of my controllers and all other views.
Please give me a very simple example following the best practices.
I am new in MVC development and started with MVC 3.
You use session the same way you do in webforms.
In your controllers you can simply use the
Sessionobject. You could save the state of a model inSessionand pass the result to your view.