473,765 Members | 2,134 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

IE won't maintain page state

Yes, I'm sorry, it's me again. :)

Yesterday I went through hell trying to figure out why my aspx pages
wouldn't maintain state. I had a simple example I (we) eventually got
to work.

What I've discovered is that my problem seems to lie entirely with IE.
A bit of history...

My app is an online survey. The questions, choices and so on are
stored in SQL Server tables. So my app has a login screen. It
redirects to survey.aspx. This page reads the questions and
dynamically creates the required controls; radios, textboxes, etc.
Like so:

Radios(x) = New Texbox
Radios(x).ID = Q.ID
Radios(x).Text = Q.QText
etc...

Each control is appended to a static placeholder. That works.

When a user clicks submit, the page goes to the server and code within
the click event checks the submission for errors (like a required
question not filled out). It stores this data in 2 arrays and the
code then goes through the question order again, inserting (using
AddAt) red error texts below the question texts. The page is returned
to the browser with error messages. That works.

I can correct, submit, correct, submit etc. and the errors disappear
one by one until the page is error free. That works.

Now the problem; the Back button.

If at any point during the above error/corection process the user
presses Back, all page data either disappears or I get "Page has
expired". That's with IE6.

If I use Netcape or Firefox, I can submit many, many times, and go
back many, many times. The controls I selected remain selected. If I
submit 10 times and go back 10 times, it's a perfect history of my
selections. But if I use IE6, any click of the back button loses all
data.

Keep in mind this process is all performed with the same page. I do
understand a redirect will abandon the form and its control states but
this isn't the case, fyi.

I can put IE and Netscape side by side on the same machine. Netscape
will retain the form values. IE will not.

Any ideas why?
Thanks!!!

Nov 19 '05 #1
1 1536
Nevermind.

In an effort to circumvent the back button, through the many, many
attempts to make this work, I left a statement in the Page_Load that
disables the browser history. I removed that and my pages work 100%.
No problem.

WHEW. A HUGE thank you to all that gave any advice.

Tom
On Thu, 17 Feb 2005 09:41:07 -0500, Tom wilson <ye*******@nosp am.com>
wrote:
Yes, I'm sorry, it's me again. :)

Yesterday I went through hell trying to figure out why my aspx pages
wouldn't maintain state. I had a simple example I (we) eventually got
to work.

What I've discovered is that my problem seems to lie entirely with IE.
A bit of history...

My app is an online survey. The questions, choices and so on are
stored in SQL Server tables. So my app has a login screen. It
redirects to survey.aspx. This page reads the questions and
dynamically creates the required controls; radios, textboxes, etc.
Like so:

Radios(x) = New Texbox
Radios(x).ID = Q.ID
Radios(x).Te xt = Q.QText
etc...

Each control is appended to a static placeholder. That works.

When a user clicks submit, the page goes to the server and code within
the click event checks the submission for errors (like a required
question not filled out). It stores this data in 2 arrays and the
code then goes through the question order again, inserting (using
AddAt) red error texts below the question texts. The page is returned
to the browser with error messages. That works.

I can correct, submit, correct, submit etc. and the errors disappear
one by one until the page is error free. That works.

Now the problem; the Back button.

If at any point during the above error/corection process the user
presses Back, all page data either disappears or I get "Page has
expired". That's with IE6.

If I use Netcape or Firefox, I can submit many, many times, and go
back many, many times. The controls I selected remain selected. If I
submit 10 times and go back 10 times, it's a perfect history of my
selections. But if I use IE6, any click of the back button loses all
data.

Keep in mind this process is all performed with the same page. I do
understand a redirect will abandon the form and its control states but
this isn't the case, fyi.

I can put IE and Netscape side by side on the same machine. Netscape
will retain the form values. IE will not.

Any ideas why?
Thanks!!!


Nov 19 '05 #2

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

Similar topics

3
3463
by: | last post by:
This is a very open ended question. I have an app with a page that uses link buttons to change the display. On the prior page you have a list of objects. You click one of those objects to see it's details. I have nav Link buttons that allow you to go to previous or next object from the object list on previous page. In the command event of the linkbutton, the page is redrawn with the details of the next or previous object. I am using...
1
1504
by: chak | last post by:
I have developed a form which dynamically builds textbox, radiobuttonlist, checkboxlist controls from parameters in a table, and somehow manages to maintain state (of data keyed in by user). However, the listbox that i invoke on click of a help button does not maintain state (i am not re-loading the list on postback , which is a usual problem). Does anybody have any idea what could be the issue ? The only asp control i have defined in the...
4
1119
by: rodchar | last post by:
hey all, i was wondering what are some ways to maintain state between a public site and a secured site? (Best practices and resources are welcomed). thanks, rodchar
7
2042
by: Tom wilson | last post by:
I have created a very simple example that doesn't work. Form1 contains a textbox and a button: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Response.Redirect("login.aspx") End Sub Very simple. Forget what login.aspx does, it's just somewhere to redirect to.
1
2900
by: Robert Burdick [eMVP] | last post by:
Hello All: I am writing an ASP.NET application that will take the user to PayPal to make some payments. Before going to PayPal, I collect relevant user information and store it in a session state slot. I'm using InProc session state. After the user goes through the paypal site, the session information I collected / saved is gone. Is there a way to maintain state across domains without resorting to ugliness like saving the session...
1
2178
by: darin_dimitrov | last post by:
I have an application which consists of 2 web forms. On the first page I have a datagrid with paging and sorting turned on. I also have a textbox which allows me to filter the data in the grid and narrow down the results. The grid also contains a column with hyperlinks which when clicked should invoke the second page which displays details about the current row. I call the second page with Server.Transfer("second.aspx"). On this page I...
7
10353
by: Andrew Robinson | last post by:
I have a treeview control that I use as a menu & navigation control within a master page. The nodes for this control are loaded from a database which contains the text and url of each like and the hierarchy of the menu tree. All pretty normal stuff. Is there any simple method of maintaining the expanded / collapsed state of each node as my application moves from page to page? Remember this is on a master page used by numerous content...
2
2219
by: Varangian | last post by:
Hi there again... is there a way to maintain the ViewState of WebControls when using AJAX or Callbacks ? Every time I refresh a page or use a postback from a control it would loose the components contents! how can I resolve this problem?
0
1288
by: msch-prv | last post by:
How to maintain the display state of a <divelement? Is there a simple way to maintain the display state of a <div> element? On my page, a div block can be hidden/shown by js function showhide(). I would like to maintain the block's display state when the page is posted back. I'm having difficulties to retrieve the div style attributes from the viewstate: Me.divProdCat.Style.Item("display") always returns the same attribute.
0
10156
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...
1
9951
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9832
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...
1
7375
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6649
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5275
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...
1
3924
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
3531
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2805
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.