处理Asp.net Ajax框架12029,12007错误
2008-08-15 11:18:38 来源:WEB开发网核心提示:<asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <script language="javascript" type=&q
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<script language="javascript" type="text/Javascript">
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
function EndRequestHandler(sender, args)
{
if (args.get_error() != undefined)
{
if ((args.get_response().get_statusCode() == '12007') || (args.get_response().get_statusCode() == '12029'))
{
document.writeln("服务器连接失败。");
window.onerror = false; //JS中遇到脚本错误时不做任何操作
}
}
}
</script>
[]
更多精彩
赞助商链接