Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Preventing multiple clicks on a button.

Preventing multiple clicks on a button.

Scheduled Pinned Locked Moved ASP.NET
csharpcsshelpquestion
5 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Janu_M
    wrote on last edited by
    #1

    Hi Everybody, I am developing a weblproject in C# using .net2005. In my page i have a Gridview, some text boxes, dropdown lists to enter data and a button to create a new row in the Grid. The functionality is when user enters data in the textboxes and selects using dropdown and he has to click create button to create a new row in the Grid. It is working fine when user clicks the create button once. When user clicks the button multiple times (continously) then that no of data rows are creating in the gird. Here i need only one row in the Grid. How can i overcome this problem. Thanks in Advance Ramu

    S M D 3 Replies Last reply
    0
    • J Janu_M

      Hi Everybody, I am developing a weblproject in C# using .net2005. In my page i have a Gridview, some text boxes, dropdown lists to enter data and a button to create a new row in the Grid. The functionality is when user enters data in the textboxes and selects using dropdown and he has to click create button to create a new row in the Grid. It is working fine when user clicks the create button once. When user clicks the button multiple times (continously) then that no of data rows are creating in the gird. Here i need only one row in the Grid. How can i overcome this problem. Thanks in Advance Ramu

      S Offline
      S Offline
      samerh
      wrote on last edited by
      #2

      After the insert line try to use Response.Redirect(Request.Url.PathAndQuery) HTH

      J 1 Reply Last reply
      0
      • S samerh

        After the insert line try to use Response.Redirect(Request.Url.PathAndQuery) HTH

        J Offline
        J Offline
        Janu_M
        wrote on last edited by
        #3

        Thanks for your response. This is not working. Here i am not directly inserting the record into the Grid. First i am writing that record to a CSV File.From that I am constructing a datatable and giving that datatable as a datasource to the Grid. THis is the requirement of the project. Ramu

        1 Reply Last reply
        0
        • J Janu_M

          Hi Everybody, I am developing a weblproject in C# using .net2005. In my page i have a Gridview, some text boxes, dropdown lists to enter data and a button to create a new row in the Grid. The functionality is when user enters data in the textboxes and selects using dropdown and he has to click create button to create a new row in the Grid. It is working fine when user clicks the create button once. When user clicks the button multiple times (continously) then that no of data rows are creating in the gird. Here i need only one row in the Grid. How can i overcome this problem. Thanks in Advance Ramu

          M Offline
          M Offline
          Michael Sync
          wrote on last edited by
          #4

          Ramu.M wrote:

          When user clicks the button multiple times (continously)

          You can prevent this by disabling the button.. If the users click the button, you can disable it by using Javascript. After the processing is done, you can re-enabled it.

          Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net)

          1 Reply Last reply
          0
          • J Janu_M

            Hi Everybody, I am developing a weblproject in C# using .net2005. In my page i have a Gridview, some text boxes, dropdown lists to enter data and a button to create a new row in the Grid. The functionality is when user enters data in the textboxes and selects using dropdown and he has to click create button to create a new row in the Grid. It is working fine when user clicks the create button once. When user clicks the button multiple times (continously) then that no of data rows are creating in the gird. Here i need only one row in the Grid. How can i overcome this problem. Thanks in Advance Ramu

            D Offline
            D Offline
            Declan Bright
            wrote on last edited by
            #5

            Several examples here[^]

            Declan Bright www.declanbright.com

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups