Sys.WebForms.PageRequestManagerParserErrorException 错误
来源:互联网 发布:js点击li切换div 编辑:程序博客网 时间:2024/05/23 02:00
Sys.WebForms.PageRequestManagerParserErrorException 错误
最近老是碰到ajax的问题,在同学那要了一个框架,虽然很好用。但是也有它的局限性。
想起以前在学校的ajax控件,但在使用ajax的时候经常出现下面的问题:
Sys.WebForms.PageRequestManagerParserErrorException:The message received from the server
count not be parsed.Common causes for this error are when the response is modified by calls to response.Write(),
response filters,HttpModules,or server trace is enabled.
Details:Error parsing near '|<html>
<head>
在网上搜索了一下,大部分解释是:
在用Response.Redirect()或Response.Write()进行URL带参数的页面重定向时出现如题所示的错误。
Ajax是无刷新的,而使用Response进行带参重定向时需要刷新页面。
解决办法1:
只须在UpdatePanel下设置“asp:PostBackTrigger”的“ControlID”为指定的控件名称即可,如:
<Triggers>
<asp:PostBackTrigger ControlID="btnSave" />
</Triggers>
但这样做就失去了ajax异步刷新的功能,跟不用没有什么区别。在特定的环境有可能会用到。
解决办法2:
在返回响应时不用Response对象,
ScriptManager.RegisterClientScriptBlock(this.UpdatePanel1,this.GetType(),"test","alert('插入成功')",true);
- Sys.WebForms.PageRequestManagerParserErrorException 错误
- Sys.WebForms.PageRequestManagerParserErrorException错误
- Sys.WebForms.PageRequestManagerParserErrorException 错误
- Sys.WebForms.PageRequestManagerParserErrorException 错误
- Sys.WebForms.PageRequestManagerParserErrorException错误
- Sys.WebForms.PageRequestManagerParserErrorException 错误的解决办法
- Sys.WebForms.PageRequestManagerParserErrorException 错误的解决办法
- Sys.WebForms.PageRequestManagerParserErrorException 错误的解决办法
- Sys.WebForms.PageRequestManagerParserErrorException 错误的解决办法
- Sys.WebForms.PageRequestManagerParserErrorException 错误的解决办法
- Sys.WebForms.PageRequestManagerParserErrorException错误的解决方法
- Sys.WebForms.PageRequestManagerParserErrorException 错误的解决办法
- Sys.WebForms.PageRequestManagerParserErrorException 错误的解决办法
- Sys.WebForms.PageRequestManagerParserErrorException
- Sys.WebForms.PageRequestManagerParserErrorException
- Sys.WebForms.PageRequestManagerParserErrorException详解
- Microsoft JScript 运行时错误: Sys.WebForms.PageRequestManagerParserErrorException
- Sys.WebForms.PageRequestManagerParserErrorException的解决方法
- Hibernate学习笔记1
- 与图片的二进制数据库存储和显示
- MyEclipse序列号生成
- 所有的输入必须做正则化
- 开始新的历程~
- Sys.WebForms.PageRequestManagerParserErrorException 错误
- 简单介绍 P3P 技术
- 关于性能优化的以及int Number uint的比较
- first
- 访问本地localhost时,要求输入用户名和密码的解决方法
- 网络管理员入门与基础技术
- 软件开发随记之一 —— 添加功能开关
- 宿舍管理系统需求说明书
- 清空所有的textbox 的递归方法