?
Solved

Why doesn't form save values on back button click?

Posted on 2008-10-11
7
Medium Priority
?
399 Views
Last Modified: 2013-12-17
What are some of the reasons an asp.net (3.5) form may not save form values from user input after clicking submit then clicking the back button?  I have a muti page registration process.  If the user moves to the next page or encounters an error that puts them on the eror page, all of their input is erased when clicking the back button.   All of the field values are inside an updatepanel.
0
Comment
Question by:brettr
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 4

Expert Comment

by:novynov
ID: 22697552
I just did a simple test scenario as follows:

- Created a page with a textbox and two buttons (one "Submit", one "Next")
- On click of the Submit button, I process whatever I need to
- On the Next button, I redirect to another page
- Clicking the browser's back button revealed the previous form with the values still plugged in.
- If I combine the 2 buttons into 1 (i.e. process form and then redirect), I get the same behavior.

So...can you give me a bit more details about your page structure, and maybe include some code snippets? I'd love to be of help if I can.
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 22698888
I think you may have your viewstate disabled.
0
 

Author Comment

by:brettr
ID: 22699258
ViewState is enabled on the master and content pages but it doesn't make a difference.  The general setup in the content page is:

<updatepanel>
   <updatepanel>controls</updatepanel>
   <updatepanel>controls</updatepanel>
   controls
</updatepanel>

Where "controls" are usually a validator, label, form field combo.   Not sure how helpfult that is though.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 83

Accepted Solution

by:
CodeCruiser earned 1200 total points
ID: 22699265
It could have to do something with the AJAX then as AJAX breaks the history.
0
 

Author Comment

by:brettr
ID: 22699382
Ok.  I know a short circuit would be to store the values temporarily on submission and just apply them back (if not null) on page_load.  Is there a better way?
0
 
LVL 7

Assisted Solution

by:ajolly
ajolly earned 800 total points
ID: 22699958
have you done some experiments with outputcache?
0

Featured Post

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question