Home All Groups Group Topic Archive Search About

Maintaining "ViewState" Going to Another Page and Back

Author
14 Jan 2006 7:57 PM
Steve Murphy
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.

Author
15 Jan 2006 2:10 AM
Peter Bromberg [C# MVP]
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




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.
>
>
>
Are all your drivers up to date? click for free checkup

Author
15 Jan 2006 4:11 AM
Joe
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.
>
>
>

Bookmark and Share