Sys.WebForms.PageRequestManagerServerErrorException [英] Sys.WebForms.PageRequestManagerServerErrorException

查看:148
本文介绍了Sys.WebForms.PageRequestManagerServerErrorException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用用C#asp.net和使用更新潘内尔以及闪光控制我收到错误有时并不是所有的时间,也没有网页浏览之后再plz帮助我出去

I am using the asp.net with c# and using the update pannel as well as flash control i am getting the error sometime not all time and no page navigate after then plz help me out

以下是在弹出窗口中massange: -

following is the massange on the pop up window:-

Sys.WebForms.PageRequestManagerServerErrorException:在处理服务器上的请求时出现未知错误状态code从服务器返回信息:0

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

请帮我出SENCE可在演示时的应用程序可能carsh

Please Help me out sence may on the demo time the application may carsh

推荐答案

我记得是什么,这个错误在我的情况是存在的被点击日历控件,并将其贴回文本框,以填补值时。这个日历控件在UpdatePanel中。在这个日历控件后回来,如果我点击一个按钮,这是不是在UpdatePanel的(并导致页面回发),则出现此错误。

What I remember is, this error was occuring in my case when a calendar control was clicked and it posted back to fill value in textbox. This calendar control was in UpdatePanel. During this calendar control post back if I click a button which is not in UpdatePanel (and causes page to post back) then this error occurs.

您可以遵循这样的:
<一href=\"http://msdn.microsoft.com/en-us/library/bb398934.aspx\">http://msdn.microsoft.com/en-us/library/bb398934.aspx

通过添加这个脚本就可以避免错误的显示。

By adding this script you can avoid displaying of error.

   <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>

这篇关于Sys.WebForms.PageRequestManagerServerErrorException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆