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.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
--
Co-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 processin
g,
> 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 bu
t
> ListBox content and selected index. Am I missing something, or do I need t
o
> 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
"Steve Murphy" wrote:
> I have an application where I need to leave a page, perform some processin
g,
> 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 bu
t
> ListBox content and selected index. Am I missing something, or do I need t
o
> store that separately on my own?
> Thanks.
>
>
Monday, March 26, 2012
Maintaining "ViewState" Going to Another Page and Back
Labels:
application,
asp,
back,
fields,
leave,
maintaining,
net,
page,
perform,
processing,
return,
updated,
viewstate
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment