[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

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

Posted on 2008-10-11
7
Medium Priority
?
401 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
Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

 
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

656 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