How can I disable or enable button in asp.net? I want to disable button after click to prevent double click. I am trying to disable my Login button after clicking on it.
write a java-script function which checks the user name and password.
If they are not blank the disable the button.
But if you disable the button and there is a postback. And after the postback still it will be enable.
So Idea is
to prevent .NET from mangling the name.--edit
Your java-script code
function btn_disable
{
//check for user name and password
// if filled
document.getElementById("btn").disabled=true;
}