IE won't maintain page state

T

Tom wilson

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!!!
 
T

Tom wilson

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,139
Latest member
JamaalCald
Top