Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > preventing users from submitting inputs twice

Thread Tools

preventing users from submitting inputs twice

Arne Vajhøj
Posts: n/a
Lasse Vågsæther Karlsen wrote:
> There is one for-sure way to prevent double-orders:
> 1. generate a unique id (guid) alongside the order process
> 2. keep the guid with the order on all pages, up to the submit button
> 3. prevent any order from being processed if the guid is already in the
> "processed" list
> Couple that with your visual change on the button, and you should be set.

That is indeed the way to do it.

It is known as Synchronizer Token Pattern or just Token Pattern.

Reply With Quote
Jerry C
Posts: n/a
I use:

<html xmlns="" >
<head runat="server">
<title>Untitled Page</title>
<script language="javascript" type="text/javascript" >
function HideDiv()
var divM = document.getElementById("divMain"); = 'hidden';

<form id="form1" runat="server" onsubmit="HideDiv();">
<div id="divMain">
<asp:Button ID="Button1" runat="server" Text="Button" />


"Cor Ligthert[MVP]" wrote:

> Ned,
> I never will make this at single step process. At least you need a step,
> wherin the user can verify what his/her input was (withouth sending of
> course confidential information) and then process "the already gotten
> information" with a kind of process button only one time.
> (And don't forget to tell that it is processed)
> Just my thought, the implementation is yours.
> Cor
> "Ned White" <nedwhite@> schreef in bericht
> news:O$(E-Mail Removed)...
> > Hi All,
> >
> > Im my c# web project, users click a submit button for credit card payment
> > process.
> > On the web server side ( on ButtonClick_Event) the user's
> > input(name,date,cc number etc.) is processed and some transactional
> > database processes are taken based on the inputs.
> >
> > My problem is, users may think that the button click did not work, so they
> > can click it again and again or they can refresh the all page by pressing
> > the F5 button.
> > And These actions can lead to two or more submissions, resulting in more
> > database records being added for the same payment request.
> >
> > How can i prevent users from submitting inputs twice and refreshing the
> > page ?
> >
> > Thanks..
> >
> > NED
> >
> >
> >


Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Preventing the Enter key from submitting a form donpro Javascript 2 11-09-2007 07:33 PM
twice(twice(x)) Kiuhnm C++ 2 04-01-2006 04:41 PM
Preventing same user from logging twice Karthik ASP General 1 03-18-2005 12:17 PM
preventing users from dropping wireless onto the lan jim Wireless Networking 3 08-31-2004 07:33 PM
Preventing users from accessing Cisco PDM lombardi Cisco 1 04-13-2004 06:00 PM