如何为进度条脚本设置超时

时间:2015-12-17 06:24:15

标签: javascript jquery asp.net progress-bar webpage

 <script type="text/javascript">
    var prm = Sys.WebForms.PageRequestManager.getInstance();
    //Raised before processing of an asynchronous postback starts and the postback request is sent to the server.
    prm.add_beginRequest(BeginRequestHandler);
    // Raised after an asynchronous postback is finished and control has been returned to the browser.
    prm.add_endRequest(EndRequestHandler);
    function BeginRequestHandler(sender, args) {
        //Shows the modal popup - the update progress
        var popup = $find('<%= modalPopup.ClientID %>');
        if (popup != null) {
            popup.show();


        }
    }
    function EndRequestHandler(sender, args) {
        //Hide the modal popup - the update progress
        var popup = $find('<%= modalPopup.ClientID %>');
       if (popup != null) {
           popup.hide();               


       }
   }

</script>

1 个答案:

答案 0 :(得分:0)

我得到了解决方案。

设置超时AsyncPostBackTimeout =&#34; 50000&#34;在ToolkitScriptManager或ScriptManager中