I have a search box that is implemented as a partial view. I would like the last searched value to remain (think of Yelp, where the location is always there, regardless of the page you are viewing). I am thinking of storing this in a cookie, but I am not sure where to add the code to read the cookie and add the value to the view model. Any suggestions would be appreciated.
Share
Update
Then in your controller, partial or code-behind you could call it like so…
I wouldn’t put a location property in any model unless it’s a base model that other models that need location information inherit…
I use this pattern to access parameters from different stores. Use it to cache values that don’t change often…