Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

Show processing on button click event

$
0
0

Hi ,

How to display the processing image on button click event. The click event takes a longer time and hence I do not want the user to click on the button multiple times. How to show a processing image when the button is clicked and the when the processing is completed, show the results and hide the processing image

I am using the below code:

<form id="form1" runat="server" class="container"><asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true" AsyncPostBackTimeout="360000"></asp:ScriptManager><asp:UpdatePanel ID="upd1" runat="server" ><ContentTemplate><div class="container"><div class="form-group" id="divDefBtn" runat="server" visible="false"><div class="col-sm-offset-4 col-sm-6"><asp:Button ID="btnOne" runat="server" Text="Run Test" CssClass="btn btn-primary" OnClick="btnOne_Click"  /></div></div></ContentTemplate></asp:UpdatePanel></form></body></html><script type="text/javascript">
    Sys.WebForms.PageRequestManager.getInstance().add_endRequest(function (sender, args) {
        if (args.get_error() && args.get_error().name === 'Sys.WebForms.PageRequestManagerTimeoutException') {
            args.set_errorHandled(true);
        }
    });</script>

Thanks


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>