Click here to Skip to main content
12,953,007 members (35,570 online)
Rate this:
Please Sign up or sign in to vote.
See more:
I have a form. On submit of a button, it inserts a record into the db. If I go back in my browser and refresh the page it's resubmitting it causing all sorts of issues as you can imagine. How do I ensure that the user can't refresh the previous page and the state of that page does another automatic submit on refresh like this?

I'm not using ViewState. I actually have it disabled in the page directive
No, Response.Redirect does NOT solve this problem. The user can still go back with the browser's back button and refresh at the point where they submitted and it will still run the button's event sending the data downstream to my DL insert
Posted 20-Feb-13 0:55am
Updated 20-Feb-13 0:57am
Rate this: bad
Please Sign up or sign in to vote.

Solution 3

Try doing with this:


hope it helps :)
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Simple solution is clear text of controls and check for validation though event will get fired it wil check for validation.
Please let me know if this helpful.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month
OriginalGriff 6,389
CHill60 3,490
Maciej Los 3,103
Jochen Arndt 1,975
ppolymorphe 1,920

Advertise | Privacy | Mobile
Web02 | 2.8.170525.1 | Last Updated 20 Feb 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100