473,406 Members | 2,710 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

textbox states with ajax anyone?

Max
I tried the following with Web Dev 2008 with -and- without Ajax Extension
3.5 - using IE 7
I reduced my webform1 to a Scriptmanager and an Updatepanel with 2 textbox
and a button. I type something in textbox1, press the button and a function
runs and completes textbox2.
Then I hyperlink to webform2, come back, and not only textbox2 is blank (one
can thinks it was dynamically updated...) but also textbox1 is empty !

What mistake I'm doing? this behaviour is evidently not possible
Thanks Max


Jun 27 '08 #1
5 1272
When you navigate to webform2, webform1's gone. When you come back to it,
the server loads it again. You need to set the values in the Page_Load
event.

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"Max" <mmwrote in message
news:48***********************@reader4.news.tin.it ...
>I tried the following with Web Dev 2008 with -and- without Ajax Extension
3.5 - using IE 7
I reduced my webform1 to a Scriptmanager and an Updatepanel with 2 textbox
and a button. I type something in textbox1, press the button and a
function runs and completes textbox2.
Then I hyperlink to webform2, come back, and not only textbox2 is blank
(one can thinks it was dynamically updated...) but also textbox1 is empty
!

What mistake I'm doing? this behaviour is evidently not possible
Thanks Max


Jun 27 '08 #2
Max
I mean coming back to webform1 with the browser back button. I expect to
find what I left, or at least what I typed.
"Eliyahu Goldin" <RE**************************@mMvVpPsS.orgha scritto nel
messaggio news:um**************@TK2MSFTNGP02.phx.gbl...
When you navigate to webform2, webform1's gone. When you come back to it,
the server loads it again. You need to set the values in the Page_Load
event.

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"Max" <mmwrote in message
news:48***********************@reader4.news.tin.it ...
>>I tried the following with Web Dev 2008 with -and- without Ajax Extension
3.5 - using IE 7
I reduced my webform1 to a Scriptmanager and an Updatepanel with 2
textbox and a button. I type something in textbox1, press the button and
a function runs and completes textbox2.
Then I hyperlink to webform2, come back, and not only textbox2 is blank
(one can thinks it was dynamically updated...) but also textbox1 is empty
!

What mistake I'm doing? this behaviour is evidently not possible
Thanks Max



Jun 27 '08 #3
Try the same with some commercial sites. You will see that although some
search-oriented sites like Google and Answers.com do preserve your typing,
it is rather an exception. Most pages load in a regular way on hitting the
Back.

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
"Max" <mmwrote in message
news:48***********************@reader1.news.tin.it ...
>I mean coming back to webform1 with the browser back button. I expect to
find what I left, or at least what I typed.
"Eliyahu Goldin" <RE**************************@mMvVpPsS.orgha scritto
nel messaggio news:um**************@TK2MSFTNGP02.phx.gbl...
>When you navigate to webform2, webform1's gone. When you come back to it,
the server loads it again. You need to set the values in the Page_Load
event.

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"Max" <mmwrote in message
news:48***********************@reader4.news.tin.i t...
>>>I tried the following with Web Dev 2008 with -and- without Ajax Extension
3.5 - using IE 7
I reduced my webform1 to a Scriptmanager and an Updatepanel with 2
textbox and a button. I type something in textbox1, press the button and
a function runs and completes textbox2.
Then I hyperlink to webform2, come back, and not only textbox2 is blank
(one can thinks it was dynamically updated...) but also textbox1 is
empty !

What mistake I'm doing? this behaviour is evidently not possible
Thanks Max



Jun 27 '08 #4
when the browser navigates a to a page in the cache, it loads it from the
original cache image, any updates to the dom done by javascript are not
saved so will not appear by back navigation.

to get around this limitation most ajax libraries have some sort of history
support. for asp.net in in the futures extensions. you will need to write
javascript to support this (usually an ajax call to the server to get context
info on a nav back).

this is actually fairly a complex to do corectly, so you should read
serveral articles about browser history, bookmarks and ajax calls before
tackling.
-- bruce (sqlwork.com)
"Max" wrote:
I tried the following with Web Dev 2008 with -and- without Ajax Extension
3.5 - using IE 7
I reduced my webform1 to a Scriptmanager and an Updatepanel with 2 textbox
and a button. I type something in textbox1, press the button and a function
runs and completes textbox2.
Then I hyperlink to webform2, come back, and not only textbox2 is blank (one
can thinks it was dynamically updated...) but also textbox1 is empty !

What mistake I'm doing? this behaviour is evidently not possible
Thanks Max


Jun 27 '08 #5
Max
Bruce,
indeed the last Ajax extension implements history management, but it doesn't
apply to multi-page. That is, if you change webform, history points are lost
even if you come back, and this is a huge limitation in my opinion.
So "an ajax call to the server to get context info on a nav back" works
only on the same page at the current state of the art.
I'd like to intercept a "browser back button pressed" javascript event, but
I can't.
If I get webform1 by pressing back button, how can I detect that in
javascript? Or, what javascript event is thrown when getting webform1 in any
way, even with back button?
"bruce barker" <br*********@discussions.microsoft.comha scritto nel
messaggio news:B9**********************************@microsof t.com...
when the browser navigates a to a page in the cache, it loads it from the
original cache image, any updates to the dom done by javascript are not
saved so will not appear by back navigation.

to get around this limitation most ajax libraries have some sort of
history
support. for asp.net in in the futures extensions. you will need to write
javascript to support this (usually an ajax call to the server to get
context
info on a nav back).

this is actually fairly a complex to do corectly, so you should read
serveral articles about browser history, bookmarks and ajax calls before
tackling.
-- bruce (sqlwork.com)
"Max" wrote:
>I tried the following with Web Dev 2008 with -and- without Ajax Extension
3.5 - using IE 7
I reduced my webform1 to a Scriptmanager and an Updatepanel with 2
textbox
and a button. I type something in textbox1, press the button and a
function
runs and completes textbox2.
Then I hyperlink to webform2, come back, and not only textbox2 is blank
(one
can thinks it was dynamically updated...) but also textbox1 is empty !

What mistake I'm doing? this behaviour is evidently not possible
Thanks Max



Jun 27 '08 #6

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

Similar topics

1
by: Phil Stanton | last post by:
I am trying to create a text box in Word the same height as one on a report and then fill it with text. I can "read" the position of the text box from the report OK and create a text box in Word...
0
by: Waran | last post by:
I need to create a Auto suggests Textboox like in http://www.google.com/webhp?complete=1&hl=en I have completed this using AJAX.NET for Framework 1.1 . I have some design issues after the data is...
7
by: Ivan Marsh | last post by:
Hey Folks, I'm having a heck of a time wrapping mind around AJAX. Anyone know of a simple, straight-forward example for pulling a simple query from mysql with PHP using AJAX? As I...
1
by: jeswin12 | last post by:
Im looking for a United States (US) state selector (hardcoded). ie., if you type in "mi" in the textbox, you should have a drop down (ajax) with missouri, missisipi displayed at the box below the...
5
by: Mukesh | last post by:
Hi i want to use AJAX.net in my Existing Application I have already installed the ajax .net ..net 3.0 and using VS 2005 in the old application i have added a new web form then script manager...
3
by: Mukesh | last post by:
HI all I have created a user ctrl for user info. On which i have used some asp ctrls, .net Ajax (Atlas) Ctrls and validation as described below Name TxtBox1(RequiedFieldValidator,...
4
by: davidson1 | last post by:
Hai friends, I am doing project in ASP.NET(vb) , I have Installed the software Microsoft ASP.NET 2.0 AJAX Extensions My Question is I have 2 Textbox Regno:- Textbox1 Name :- Textbox2
2
by: mylog | last post by:
Hi all, I am having a small problem on getting the values of the dynamically generated textboxes in C# windows application. I have successfully read an xml file and put its key and value fields as...
5
by: techbytes | last post by:
I have a two textboxes.Depending onthe value of textbox1,textbox2 value changes.I didit in ajax. I want to know after getting the response,i donot know to write or overwrite the value into the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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,...

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.