Search code examples
asp.netopacitybuttonclick

how to opacity the asp.net page on button click , till procees get complete


how to opacity the asp.net page on button click , till procees get complete of respective button.

Can anyone help me ?


Solution

  • If it's a regular postback, use client side javascript to disable the button before the actual postback happens.

    <asp:Button runat="server" ID="myBtn" OnClick="YourServerSidePostBack" 
         OnClientClick="document.getElementById('<%= myBtn.ClientID %>').disabled = true;" />