Today, I want to use JS to disable the button control of ASP, check for a long time, are a line of code ....
document.getElementById ("Button1"). Disabled = ' disabled ';
Tried a lot of methods, do not work, accidentally found that only the button control Usesubmitbehavior property to false; Ojbk.
In ASP. NET, the button's Usesubmitbehavior property defaults to True. When True, the type is "submit" by default, and False is the "button" type ...
Use the Usesubmitbehavior property to specify whether the Button control uses the client browser's commit mechanism or the ASP. By default, this property has a value of true, which causes the Button control to use the browser's commit mechanism. If False is specified, the ASP. NET page framework adds client script to the page to send the form to the server.
PS (Nothing to do, not to find the way is no turning)
The ASP. NET button control uses JS disabled