asp.net: How to disable asp.net button after clicked
1st step: Create Java script function to disable the button
function disableBtn(btnID, newText) {
var btn = document.getElementById(btnID);
setTimeout("setImage('"+btnID+"')", 10);
btn.disabled = true;
btn.value = newText;
}
2nd step:
Call onclientclick action for the button
OnClientClick="disableBtn(this.id, 'Upload data ')" UseSubmitBehavior="false"
Database Analysis & development tools, issues & solutions including ORACLE, SQL Server,MS ACCESS & VB.NET
Saturday, June 12, 2010
Subscribe to:
Posts (Atom)