473,672 Members | 2,435 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Maintaining "ViewState" Going to Another Page and Back

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 NameValueCollec tion 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.
Jan 14 '06 #1
2 1126
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 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 NameValueCollec tion 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.

Jan 15 '06 #2
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

"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 NameValueCollec tion 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.

Jan 15 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2331
by: Trevor Andrew | last post by:
Hi There, I have posted something previously regarding this issue, but I think I have some more concise questions to ask, and would like to get further feedback on this issue. Firstly the background. I have a small ASP.NET application under development. I'm using VS 2002 with Framework 1.1. One of the pages is a "resources" page that contains a list-box of various RSS feeds I am interested in surveying. As you select the different RSS...
4
529
by: sklett | last post by:
I have 2 dropdownlist on a page. They have ViewState = true. After I submit to the page, the selection in the DropDownList is lost. I set a break in the Page_Load event to make sure that I wasn't re-binding them somehow... I'm not. So shouldn't they maintain their selection? Anything you can think of to check? Thanks- Steve
4
409
by: sklett | last post by:
I have 2 dropdownlist on a page. They have ViewState = true. After I submit to the page, the selection in the DropDownList is lost. I set a break in the Page_Load event to make sure that I wasn't re-binding them somehow... I'm not. So shouldn't they maintain their selection? Anything you can think of to check? Thanks- Steve
1
2410
by: Steph | last post by:
I am trying to save a simple integer value in ViewState. I set the value in the Page_Load() event and retrieve it in the function Page_Unload() event. The value seems to be set correctly, but upon the next Page_Load(), I get the following error when I try to retrieve the value from ViewState: "function 'ViewState.get_Item' evaluated and returned null". The page does have a form on it with the runat="server" attribute set. From the...
0
8488
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8932
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8832
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8685
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7449
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4230
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4421
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2821
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2067
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.