how could i persist the page state after page redirect in asp.net MVC? -
i have search filed , gridview, if jump page , when redirect back, of states not persist, create search model save data , keep in session, search in page , fields not fixed. there way solve this?
the general options store in tempdata available upon next request or store in cache or reload or store in session longer persistence. how web works far being stateless need figure 1 of these general methods. cookies quite limited exclude them in case.
ideally - if use repository pattern loading data, in repository method can add data cache current user's login id - if data makes sense cache. if want available next request, add tempdata["yourdata"] = yourobject
after read on next request automatically flagged deletion @ end of request processing.
Comments
Post a Comment