473,469 Members | 1,447 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Ajax-ly updated controls lose their viewstate

I have a label control, which is wrapped up by
<asp:UpdatePanel><ContentPlateetc.

The Text property of the label is set upon a button click.

This works fine. But if I navigate to another page and then come back
to this page through the browser's back button, the text value of this
label disappears!

Whereas other controls on the same page which are not wrapped up in
UpdatePanel and are updated in a similar fashion do not lose their
updated value upon backing up through the browser's back button.

I know I can remove the ajax functionality to get rid of the problem,
but I sorta like to have the ajax functionality. Any workaround?
Thanks.

Oct 29 '07 #1
2 3183
Scott and Nikhil have a workaround that would work for your case:

http://weblogs.asp.net/scottgu/archi...datePanel.aspx
/// ------------------------------
/// Braulio Diez
///
/// http://www.tipsdotnet.com
/// ------------------------------


"gnewsgroup" wrote:
I have a label control, which is wrapped up by
<asp:UpdatePanel><ContentPlateetc.

The Text property of the label is set upon a button click.

This works fine. But if I navigate to another page and then come back
to this page through the browser's back button, the text value of this
label disappears!

Whereas other controls on the same page which are not wrapped up in
UpdatePanel and are updated in a similar fashion do not lose their
updated value upon backing up through the browser's back button.

I know I can remove the ajax functionality to get rid of the problem,
but I sorta like to have the ajax functionality. Any workaround?
Thanks.

Oct 30 '07 #2
On Oct 30, 9:07 am, Braulio Diez <braulio121NOS...@yahoo.eswrote:
Scott and Nikhil have a workaround that would work for your case:

http://weblogs.asp.net/scottgu/archi...F00_Trick_3A00...

/// ------------------------------
/// Braulio Diez
///
///http://www.tipsdotnet.com
/// ------------------------------

"gnewsgroup" wrote:
I have a label control, which is wrapped up by
<asp:UpdatePanel><ContentPlateetc.
The Text property of the label is set upon a button click.
This works fine. But if I navigate to another page and then come back
to this page through the browser's back button, the text value of this
label disappears!
Whereas other controls on the same page which are not wrapped up in
UpdatePanel and are updated in a similar fashion do notlosetheir
updated value upon backing up through the browser's back button.
I know I can remove the ajax functionality to get rid of the problem,
but I sorta like to have the ajax functionality. Any workaround?
Thanks.
Thanks a lot. That does sound like a perfect solution exactly to this
problem.

Oct 31 '07 #3

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

Similar topics

4
by: bobzimuta | last post by:
I'm creating a simple AJAX library. It's an object that will return an array containing the response text or xml. I'm trying to find a way to assign the response as a property of the object, but...
10
by: Steve | last post by:
I need to build a very dynamic client and would be interested in knowing the pros and cons of using JSF and Ajax to accomplish this. Thanks. Steve
7
by: Thirsty Traveler | last post by:
Peter Bromberg has an interesting article eggheadcafe discussing AJAX libraries. He prefers ANTHEM.NET over AJAX.NET because it doesn't break the stateful page model. Our developers are currently...
5
by: dougwig | last post by:
I'm trying to handle the scenario where a user's session times out and and their ajax request triggers a redirection by the webserver (302 error?). I'm using Prototype 1.4 and the my works great...
1
by: www.web20developers.com | last post by:
http://www.web20developers.com http://www.web20developers.com/index.php?option=com_content&task=view... Ajallerix : AJAX, simple, fast Web image gallery demo ; at Novell AJAX -...
10
by: trpost | last post by:
I am using ajax / php where I am looking up some info from the database and populating a select list dynamically, however I am running into some sort of size limitation with the ajax.response...
0
by: Free Ebooks | last post by:
81 AJAX and 24 JavaScript Ebooks Here are some of the AJAX topics and areas covered by these ebooks: Rails and AJAX Building Ajax Web Applications Creating Ajax Web Pages Ajax Patterns Ajax...
1
by: shaunwo | last post by:
I'm an AJAX / DOM Novice (at best) and trying to figure out how to write the value to a couple input fields. I don't remember exactly where I got the ajax.js file I'm using from (went to the website...
6
by: Scott M. | last post by:
What is the version number of AJAX when we talk about ASP .NET AJAX in VS 2008?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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...
0
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...
0
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,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...

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.