473,322 Members | 1,417 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

preventing users from submitting inputs twice

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

Apr 9 '08 #1
9 1321
Hi Ned,

Maybe you can navigate away from the page and put a mechanism in place that
detects if a user allready inserted a payment record?

With kind regards,

Matthijs Krempel

"Ned White" <nedwhite@schreef in bericht
news:O$*************@TK2MSFTNGP06.phx.gbl...
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
Apr 9 '08 #2
on the click event disable the button

sender.Enabled = False
"Ned White" <nedwhite@wrote in message
news:O$*************@TK2MSFTNGP06.phx.gbl...
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
Apr 9 '08 #3
On Wed, 9 Apr 2008 14:06:30 +0300, "Ned White" <nedwhite@wrote:
>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
Firstly put up an immediate response along the lines of "We have
received your submission. It will take a few seconds to process.
Please do not resend yout details or refresh this page." That tells
the customer that you have got the transaction and are working on it.
Once you have finished processing then put up a "Thank you for your
custom" response. Always give immediate feedback to the customer so
they know what is happening.

Secondly keep a record of all recent transactions and query if any
duplicates come up within say ten minutes.

rossum

Apr 9 '08 #4
On Apr 9, 7:46*am, "ThatsIT.net.au" <me@workwrote:
on the click event disable the button

sender.Enabled = False
That does not work, that event is executed in the server, he needs
something that execute in the client.
Apr 9 '08 #5
On Apr 9, 9:06*am, rossum <rossu...@coldmail.comwrote:
On Wed, 9 Apr 2008 14:06:30 +0300, "Ned White" <nedwhite@wrote:
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

Firstly put up an immediate response along the lines of "We have
received your submission. *It will take a few seconds to process.
Please do not resend yout details or refresh this page." *That tells
the customer that you have got the transaction and are working on it.
Once you have finished processing then put up a "Thank you for your
custom" response. *Always give immediate feedback to the customer so
they know what is happening.

Secondly keep a record of all recent transactions and query if any
duplicates come up within say ten minutes.

rossum- Hide quoted text -

- Show quoted text -
IMHO it's just better to disable the submit mechanism.
You could also use a sort of veil control
Apr 9 '08 #6
Look at paypal. They have a button which when clicked has JavaScript to
disable the button and then post the form.

Apr 9 '08 #7

"Ignacio Machin ( .NET/ C# MVP )" <ig************@gmail.comwrote in
message
news:24**********************************@t54g2000 hsg.googlegroups.com...
On Apr 9, 7:46 am, "ThatsIT.net.au" <me@workwrote:
on the click event disable the button

sender.Enabled = False
That does not work, that event is executed in the server, he needs
something that execute in the client.
this.disabled = true

Apr 10 '08 #8
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$*************@TK2MSFTNGP06.phx.gbl...
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
Apr 10 '08 #9
I use:

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<script language="javascript" type="text/javascript" >
function HideDiv()
{
var divM = document.getElementById("divMain");
divM.style.visibility = 'hidden';
}

</script>
<body>
<form id="form1" runat="server" onsubmit="HideDiv();">
<div id="divMain">
<asp:Button ID="Button1" runat="server" Text="Button" />
</div>
</form>
</body>
</html>
--
Jerry
"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$*************@TK2MSFTNGP06.phx.gbl...
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

Jun 27 '08 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Bruce | last post by:
I have a number of forms that do significant work based on variables POSTed from the form. What is the common method of detecting and preventing this work from being done when the form is POSTed as...
3
by: Fred | last post by:
Hi out there, I have problems finding a way to warn a user that another user intends soon to update the same specific row. Let me explain. User 1 get to a JSP "update customer record" page....
1
by: Karthik | last post by:
Hi, I have a website running on ASP.Net on IIS 6.0. This website has more than 10000 users login everyday. At times the users login with the same user name and password more than once at the...
8
by: CJM | last post by:
How do people go about preventing the user from submitting a form for a 2nd time? For example, the user submits a form, clicks on the back button, and the submits the form again. I have used...
3
by: Chris | last post by:
I have a lookup table which contains authorisation codes for a particular operation. When a user makes a booking a random reference number is generated. The user obtains the code from his/her...
4
by: Nacho Nachev | last post by:
This may sound like a silly question, but what is the appropriate way to handle form double submitting in ASP.NET. Page expiration, etc? I am looking for a way to handle this in some cetral point...
6
by: Oleg Konovalov | last post by:
Hi, I have a web application which is (among other things) doing large SQL Insert's, so sometimes it takes a while, user becomes impatient and clicks again (or just does double-click), so the...
18
by: NavinM | last post by:
I have a couple of forms that are misbehaving in FireFox, but work fine in IE. when i do submit( with submit button) a javascript function validates all of the fields entered, and stops the...
9
by: Ned White | last post by:
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...
13
by: RJ_32 | last post by:
looking here: http://www.devarticles.com/c/a/PHP/Getting-Intimate-With-PHPs-Mail-Function/2/ it says that I have to be careful about what I send to the sendmail process via popen(). Does that...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.