Home
|
Software
|
WebLog
|
Contact
|
Wish List
navigation
software
RxFind - Search/Replace
.net DatabaseUtility lib.
GAlert - Gmail Notify
code, scripts, etc...
Akismet .Net 2.0 API
Price vs Cost
WebLogs / Blog
Page Comments
Cookie Detection
Refresh Detection
Global Error Handler
Easy HTTP .Net
California Lottery
ASP.NET HTML Template
Bookmarklets
tech articles
Extend ASP 2.0 security
Safe Web Surfing
toys and gadgets
T-Mobile Sidekick II
Sony DirecTiVo
GT I-Drive 6.0 (bike)
Bit Char-G (R/C car)
SolarSpeeder
Canon PowerShot s200
active projects
WebLogs
PageComments
WasArrested.com
mygurus.net
Refresh Detection (Asp.NET)
Download binary project - 9 Kb
Download source project - 11 Kb
Overview
Many websites suffer from the form browser refresh problem. For example, let's say you have a shopping cart. After the user buys item X, the page displays an invoice. The user refreshes the page, which asks if he'd like to repost the form. The user clicks "Retry" and the form is submitted again, charging his credit card and adding a duplicate order.
To fix this problem I have created a control (inspired by Dino Esposito's browser refresh detection code) that can be simply slipped into every page that may suffer from the form repost problem.
If you found this or any other code on this site usefull and want to show your appreciation, now you can. Thanks!
Example
Below is an example; a button that posts a form. (Most forms have text box fields, but for this example they are not necessary and have been omitted).
Page Status:
This page has
NOT
been refreshed.
Button Status:
This button has been clicked
0 times
.
Click the button and press your browsers refresh button to test the refresh detection.
My
contact form
now detects browser refresh to eliminate multiple submissions. Please feel free to test it out and send me an email :)
Visual Studio Toolbox Installation
Add the control to your toolbox. Go to Tools > Customize Toolbox. Click the tab .Net Framework Components. Click on Browse, locate Joel.Net.Refresh.dll and click ok. You should now see "Refresh" in the toolbox.