Solved

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

Posted on 2008-10-11
7
392 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
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
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
LVL 83

Accepted Solution

by:
CodeCruiser earned 300 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 200 total points
ID: 22699958
have you done some experiments with outputcache?
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

746 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now