I have a button like the following,
<asp:Button ID="pagerLeftButton" runat="server" OnClientClick="disable(this)" onclick="pager_Left_Click" Text="<" />
When I use my button like that, onclick is not firing. When I remove OnClientClick, then onclick is firing.
What I need to do is, disable the button during the postback and enable it after the postback ends.
Edit: Additional information:
I added break point to my firing functions is c# part and I am debugging, they are not firing for sure. Those functions are like
protected void pager_Left_Click(object sender, EventArgs e)
{
//Do smthing.
}
protected void pager_Right_Click(object sender, EventArgs e)
{
//Do smthing.
}
and when I click my button, it is disabled for 1-2 seconds and automatically enabled, but I am not sure why it is enabled. I didn't add any part for it to be enabled again.
disable
function? – Jeremyjerez