Sys.WebForms.PageRequestManagerServerErrorException

I am using asp.net with C # and using the update panel as well as flash management. I get an error sometime not all the time and do not navigate the pages after after that plz help me

Below is the mass in the popup: -

"Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 0"

Please help me, what may be during the demo time when the application can use carsh

+5
source share
3 answers

, , , , . UpdatePanel. , , UpdatePanel ( ), .

: http://msdn.microsoft.com/en-us/library/bb398934.aspx

script, .

   <script type="text/javascript" language="javascript">
    Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
    function EndRequestHandler(sender, args) {
        if (args.get_error() != undefined) {
            var errorMessage;
            if (args.get_response().get_statusCode() == '200') {
                errorMessage = args.get_error().message;
            }
            else {                
                // Error occurred somewhere other than the server page.
                errorMessage = 'An unspecified error occurred. ';                                    
            }
            args.set_errorHandled(true);                
        }
    }
</script>
+5

0 , . , , , . JavaScript, .

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server" />
        <script type="text/javascript" >
        (function() {
            var prm = Sys.WebForms.PageRequestManager.getInstance();

            if (prm)
            {
                prm.add_endRequest(
                function (sender, args) {            
                    // Any code you want here

                    if(args.get_error() && args.get_error().name === 'Sys.WebForms.PageRequestManagerServerErrorException')
                    {
                        args.set_errorHandled(args._error.httpStatusCode == 0);
                    }
                });
            }
        })();
        </script>
    </form>
</body>
</html>
+3

, , . , 'Literal1' <ItemTemplate>, <AlternatingItemTemplate>. , , , , - .

0
source

All Articles