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