preventing users from submitting inputs twice

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ned White

    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_Eve nt) 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



  • Matthijs Krempel

    #2
    Re: preventing users from submitting inputs twice

    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@schre ef in bericht
    news:O$22MHjmIH A.484@TK2MSFTNG P06.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_Eve nt) 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
    >
    >
    >

    Comment

    • ThatsIT.net.au

      #3
      Re: preventing users from submitting inputs twice

      on the click event disable the button

      sender.Enabled = False


      "Ned White" <nedwhite@wro te in message
      news:O$22MHjmIH A.484@TK2MSFTNG P06.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_Eve nt) 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
      >
      >
      >

      Comment

      • rossum

        #4
        Re: preventing users from submitting inputs twice

        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_Eve nt) 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

        Comment

        • Ignacio Machin ( .NET/ C# MVP )

          #5
          Re: preventing users from submitting inputs twice

          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.

          Comment

          • Ignacio Machin ( .NET/ C# MVP )

            #6
            Re: preventing users from submitting inputs twice

            On Apr 9, 9:06 am, rossum <rossu...@coldm ail.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_Eve nt) 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

            Comment

            • Peter Morris

              #7
              Re: preventing users from submitting inputs twice

              Look at paypal. They have a button which when clicked has JavaScript to
              disable the button and then post the form.



              Comment

              • ThatsIT.net.au

                #8
                Re: preventing users from submitting inputs twice


                "Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin @gmail.comwrote in
                message
                news:2455e088-6484-4fdc-b778-27c84b398ef5@t5 4g2000hsg.googl egroups.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

                Comment

                • Cor Ligthert[MVP]

                  #9
                  Re: preventing users from submitting inputs twice

                  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@schre ef in bericht
                  news:O$22MHjmIH A.484@TK2MSFTNG P06.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_Eve nt) 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
                  >
                  >
                  >

                  Comment

                  • =?Utf-8?B?SmVycnkgQw==?=

                    #10
                    Re: preventing users from submitting inputs twice

                    I use:



                    <html xmlns="http://www.w3.org/1999/xhtml" >
                    <head runat="server">
                    <title>Untitl ed Page</title>
                    </head>
                    <script language="javas cript" type="text/javascript" >
                    function HideDiv()
                    {
                    var divM = document.getEle mentById("divMa in");
                    divM.style.visi bility = 'hidden';
                    }

                    </script>
                    <body>
                    <form id="form1" runat="server" onsubmit="HideD iv();">
                    <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@schre ef in bericht
                    news:O$22MHjmIH A.484@TK2MSFTNG P06.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_Eve nt) 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

                    >

                    Comment

                    Working...