|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Maintaining "ViewState" Going to Another Page and BackI have an application where I need to leave a page, perform some processing,
and then return. On return, one set of fields will be updated, but the remainder should remain in the state they were in when the user left. Using the Request.Page NameValueCollection I can do this for everything but ListBox content and selected index. Am I missing something, or do I need to store that separately on my own? Thanks. Steve,
ViewState doesn't store the contents of a control at all, only the changes, and only on a postback to the same page. Hope that helps. You could use either Session or Cache if you need to. Peter -- Show quoteHide quoteCo-founder, Eggheadcafe.com developer portal: http://www.eggheadcafe.com UnBlog: http://petesbloggerama.blogspot.com "Steve Murphy" wrote: > I have an application where I need to leave a page, perform some processing, > and then return. On return, one set of fields will be updated, but the > remainder should remain in the state they were in when the user left. > > Using the Request.Page NameValueCollection I can do this for everything but > ListBox content and selected index. Am I missing something, or do I need to > store that separately on my own? > > Thanks. > > > Steven,
Using Session to store the instance of object before leaving a page. Then retrieved the instance of object before loading a page back. Hope can help you Regards, Joe Tsui Show quoteHide quote "Steve Murphy" wrote: > I have an application where I need to leave a page, perform some processing, > and then return. On return, one set of fields will be updated, but the > remainder should remain in the state they were in when the user left. > > Using the Request.Page NameValueCollection I can do this for everything but > ListBox content and selected index. Am I missing something, or do I need to > store that separately on my own? > > Thanks. > > >
Other interesting topics
Custom validator
Visual Studio 2005 Asp.net Convert wizard How to show variable on webpage? ASP.Net prefers Firefox? How to I know the previous page is clicked to forward the current page? Session Authentication Authorization Dynamically Loading user control PLS HELP: Simple adding data to db in ASP.NET 2.0 Prerender changes get lost after Page.RenderControl How to I know the previous page is clicked to forward the current page? |
|||||||||||||||||||||||