Last post Jun 17, 2013 12:37 PM by ignatandrei
Jun 15, 2013 03:06 PM|gregfnor|LINK
In MVC 4, what is the best practice for maintaing search criteria when going from a list of items to a details page , then back to the list? I would like users to be able to hit a "return to list" link and have the the form in the search view populated.
I was hoping i could send my search criteria model to the details page to build the link, but i'm not sure of the best way.
Jun 15, 2013 04:11 PM|urenjoy|LINK
You can use Session to store search criteria and on "return to list" link, get data based on Session.
Jun 17, 2013 12:24 PM|gregfnor|LINK
Thanks. I use session often when using webforms (probably too often) to do this type of thing, but is this best practice for an MVC 4 application that may run on azure one day?
If I do use session, would TempData work, or would data be lost on the details page? I'm linda new to MVC.
Jun 17, 2013 12:37 PM|ignatandrei|LINK
is this best practice for an MVC 4 application that may run on azure one day?
In azure there is a Session provider.
If I do use session, would TempData work
There is a TempDataProvider based on cookies . It should work .