• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 402
  • Last Modified:

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

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
brettr
Asked:
brettr
2 Solutions
 
novynovCommented:
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
 
CodeCruiserCommented:
I think you may have your viewstate disabled.
0
 
brettrAuthor Commented:
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
Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.

 
CodeCruiserCommented:
It could have to do something with the AJAX then as AJAX breaks the history.
0
 
brettrAuthor Commented:
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
 
ajollyCommented:
have you done some experiments with outputcache?
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now