View Complete Thread
  • ASP - Disable a button to prevent user from clicking twice

    Jan 21, 2014 07:43 AM|ashok.k|LINK

    Hi,

    I am working on an ASP website. I want to disable a button after the user clicks the button.

    If the users click the button twice by mistake, the DetailsPage.ASP is executed twice and duplicate entries are inserted into Database.

    How to disable a button in ASP code to prevent the users from clicking twice?

    Page1: Mainpage.asp page
    <form action="DetailsPage.asp" method="POST">
    <input type="Submit" name="Submitbutton" value="Update Details">

    How to prevent the users from clicking the button twice or alert them if they try to click second time?

    Another other suggestions to handle this type of scenario will be helpful.

    Thanks in advance.

    Thanks
    Ashok