Preventing accidental double clicking on a button

后端 未结 7 984
夕颜
夕颜 2020-12-18 03:11

I have a few controls that inherit from ASP.NET buttons and use onserverclick.

If the user clicks twice, the button fires two server side e

7条回答
  •  难免孤独
    2020-12-18 03:37

    Set the Button property UseSubmitBehavior to false. Then create an OnClientClick function that disables the button. It would look something like this:

    
    
    

    fastest cheapest way:

    
    

提交回复
热议问题