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!!! 1 1511
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*******@nospam.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).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!!! This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
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...
|
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)....
|
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
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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...
|
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...
|
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...
|
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...
|
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,...
| |