How to avoid multiple button clicks asp net

{0 Comments}

Most of time when user click multiple time accidently, in some situation like submitting a form you need to restrict button click for some time then use following simple code.

protected void server_btn_Click(object sender, EventArgs e)

{

server_btn.Enabled = false;

}

 C# |  copy code |? 
1
 protected void server_btn_Click(object sender, EventArgs e)
2
    {
3
        server_btn.Enabled = false;
4
 
5
    }

Leave a Comment

Your email address will not be published.