I am creating an MVC application. One of my tasks is to build a store. I configured the "master" as a set of views that forces the user to fill in different types of data until the end of the operation, in just 7 steps.
My problem is how to share some data between all of these views.
At first I used the old-fashioned Session , and everything worked on my desktop, but when I finally deployed my application to my hosting server, I got exceptions because Session was deleted randomly in a few steps.
Now I changed everything to configure any data that I need inside TempData , and update all the data at each step and it seems to work correctly.
I'm a little confused!
My confusion concerns all of these structures: the session (I know this comes from asp.net), ViewData , TempData and the magic of ViewBag .
I read a lot, but I need someone who will clearly tell me what suits me better in this case.
Jasonmenny
source share