Restoring page results in ASP.NET MVC -
i working in asp.net 3.5 mvc application. have functionality search "customer search results", using parameters.
if user enter search parameters say, date of birth/ssn/address, , hits search, search results displayed in grid below. 1 of records in results can clicked , navigates customer information page. , page can click on "return search results" come search results page again, can potentially show search parameters , results of last search.
we use sql server session state. , using viewmodel , model binder store search parameters , results. when user comes customer information page search results page using data stored in model binder bind search results back.
however user in customer information page , time session expires, , when user tries return search results page, search parameters , search results lost.
i should able pull search parameters somewhere can restored(the store should not session) when information lost. trying store parameters in sql table , pull when data in session lost.
i don't worry search results may need call service pull results, care way retrieve search parameters when lost due session expiry.
may know if there other way apart storing search parameters in table?
saravan - can use localstorage (if using javascript). implemented in quite few libraries out there , used part of jquery .data() method. i'm using mvc2 , make lot of use of mechanism - works!!
see:
http://dev.w3.org/html5/webstorage/#the-localstorage-attribute
or
http://en.wikipedia.org/wiki/web_storage
or
http://msdn.microsoft.com/en-us/library/cc197062%28vs.85%29.aspx
jim
[edit] localstorage jquery links:
Comments
Post a Comment