Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > IE won't maintain page state

Reply
Thread Tools

IE won't maintain page state

 
 
Tom wilson
Guest
Posts: n/a
 
      02-17-2005
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!!!

 
Reply With Quote
 
 
 
 
Tom wilson
Guest
Posts: n/a
 
      02-17-2005
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 <(E-Mail Removed)>
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).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!!!


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple page won't maintain state Tom wilson ASP .Net 5 02-17-2005 06:54 AM
my DataSet does not maintain State after Postback Bruno Ferreira ASP .Net 0 11-06-2003 01:13 PM
Listcontrol on placeholder does not maintain state chak ASP .Net 1 08-23-2003 09:40 PM
maintain the state of a hidden html control. George ASP .Net 2 07-21-2003 07:10 AM
Ignore exception in Application_Error event but maintain state twahl ASP .Net 2 06-30-2003 11:57 AM



Advertisments