I want when user click on button,disable it and after do work enable it from code behind
i use below code but disable it and then enable it,because page load again and doesn't call button event click from code behind
ASPX
<asp:ScriptManager runat="server"></asp:ScriptManager>
<asp:UpdatePanel runat="server" id="UpdatePanel" updatemode="Conditional">
<ContentTemplate>
<div>
<asp:Button runat="server" ID="btnReg" OnClick="reg_Click" OnClientClick="disableButton();" Text="Click On Me..." />
</div>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnReg" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
JavaScript
function disableButton()
{
document.getElementById("<%=btnReg.ClientID%>").disabled = true;
}
Code behind
protected void reg_Click(object sender, EventArgs e)
{
//do work
btnReg.Enabled = true;
}