Last post Jun 02, 2011 05:52 AM by JoH
Jun 02, 2011 04:47 AM|JoH|LINK
I have a web form which a user may be using to change a previous order details or to create a new order, before paying.
In the submit button click at the end of the form I insert or update the order in the database as appropriate then response.redirect off to paypal.
I am finding lots of users are using the browser back arrow from paypal to come back to the webform where they hit submit again. Some users seem to go back and forward to paypal several times before finally paying!
I'm trying to use viewstate to handle this - So i set viewstate("editing") = True or False on page load depending on whether it's an existing or new order, then I alter viewstate("editing") = True after the database insert of a new order (in the on-click
of the submit button).
However this isn't working and users who were creating a new order in the web form, go to paypal, hit the back arrow, hit submit again on the webform and this creates duplicate orders in the database.
It seems that setting viewstate("editing") to true after the database insert (in the on-click) is not getting saved.
Any suggestions would be appreciated. Thank you
Jun 02, 2011 04:53 AM|nobdy|LINK
Try Session instead of ViewState. That might help. Or you can disable Page caching using Meta Tags so that user do not see same page again.
here is the code
Let me know if that helps.
Jun 02, 2011 05:52 AM|JoH|LINK
Using Session rather than viewstate fixed the problem, thanks.