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

The end function of the asynchronous transfer add_endRequest is not activated

$
0
0

I have an Asp.net website where I use add_beginRequest / add_endRequest to show / hide a cursor on the screen.It worked fine, but suddenly add_endRequest has stopped working.In the code I show, alert is generated at the beginning but the final alert is not displayed.I have been removing pieces of code from web.config and it still does not work having removed everything.I have removed all the pakages.config lines and nothing. I have updated all packages like ajax and jquery, I have removed all javascript and css and it does not work.

I have created a new website with Vs and it does work, but it doesn't work on my normal website.It would be a problem to reinstall everything and something might interfere and fail again.

<%@ Page Language="C#" CodeFile="Test.aspx.cs" Inherits="dev_Test" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><script runat="server">

    protected void SuccessProcessClick_Handler(object sender, EventArgs e)
    {   // This handler demonstrates no server side exception.
        UpdatePanelMessage.Text = "The asynchronous postback completed successfully.";
    }

    // <Snippet3>
    protected void ScriptManager1_AsyncPostBackError(object sender, AsyncPostBackErrorEventArgs e)
    {  ScriptManager1.AsyncPostBackErrorMessage = e.Exception.Message;
    }
    // </Snippet3></script><html xmlns="http://www.w3.org/1999/xhtml"><body><form id="Form1" runat="server"><asp:ScriptManager runat="server" ID="ScriptManager1" OnAsyncPostBackError="ScriptManager1_AsyncPostBackError"/><script language="javascript" type="text/javascript"> 
        if( typeof(Sys) != "undefined" )
        {   Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(BeginRequestHandler);
            Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);   
        }
        else alert('PROBLEMA EN ScriptManager');

        function BeginRequestHandler(sender, args){ alert('INIT');}
        function EndRequestHandler(sender, args)  { alert('END'); } 
        </script><asp:UpdatePanel ID="UpdatePanel1" runat="Server"><ContentTemplate><asp:Panel ID="Panel1" runat="server"><asp:Label ID="UpdatePanelMessage" runat="server"/><br/>Last update:<%= DateTime.Now.ToString() %><asp:Button ID="Button2" runat="server" OnClick="Fcn_ButtonCursor_Click" Text="Cursor" Visible="true"/></asp:Panel></ContentTemplate></asp:UpdatePanel></form></body></html>


Viewing all articles
Browse latest Browse all 5678

Trending Articles



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