how do I disable Button asp.net

asp.net

Solution

You have to disable it on client so that user could not click it again.

<asp:button id="btn" runat="server" OnClientClick="this.disabled=true;"......

To disable on server side asp.net code.

btn.Enabled = false;

Problem

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.

Original source

Related problems