通过调用Response.Write()修改相应时,将启用响应筛选器、HttpModules或服务器追踪。
来源:互联网 发布:js rows 编辑:程序博客网 时间:2024/05/17 20:02
中文:
Sys.WebForms.PageRequestManagerParserErrorException:
无法分析从服务器收到的消息,之所以出现此错误,常见的原因是:通过调用Response.Write()修改相应时,将启用响应筛选器、HttpModules或服务器追踪。
详细信息:分析附近的“输出内容”时出错。
解决方法如下:
1.如果调用Response.Write()方法的服务器控件在使用UpdatePanel的页面,则只需要在UpdatePanel下增加一个<Triggers>节点,通过PostBackTrigger注册一下改控件就可以了。代码如下:
1. <asp:ScriptManager ID="ScriptManager1" runat="server">
2. </asp:ScriptManager>
3. <asp:UpdatePanel ID="UpdatePanel1" runat="server">
4. <Triggers>
5. <asp:PostBackTrigger ControlID="Button2" /> <!--Button2就是下面那个需要在Button2_Click事件里使用Response.Write()的按钮ID-->
6. </Triggers>
7. <ContentTemplate>
8. <asp:Button ID="Button2" runat="server" OnClick="Button2_Click" Text="Button" />
9. <asp:UpdateProgress ID="UpdateProgress1" runat="server">
10. <ProgressTemplate></ProgressTemplate>
11. </asp:UpdateProgress>
12. </ContentTemplate>
13. </asp:UpdatePanel>
2.但是,如果是在母版页中使用UpdatePanel,则不能通过以上方法来解决,否则或出现类似以下错误:
A control with ID 'btnExport' could not be found for the trigger in UpdatePanel 'UpdatePanel1'.
这主要是UpdatePanel1找不到<asp:PostBackTrigger ControlID="btnExport" />中注册的控件,因为,我们一般没有在母版页中添加这个控件(btnExport)。(当然,如果在UpdatePanel的<ContentTemplate> 节点下添加了ID为btnExport的控件,则不会出错。)
如果出现这样的错误该怎么办呢,我的解决方法是在需要用到Response.Write()方法的控件所在页码的Page_Load事件中添加如下代码:
((ScriptManager)Master.FindControl("ScriptManager1")).RegisterPostBackControl(btnExport);
Sys.WebForms.PageRequestManagerParserErrorException:
无法分析从服务器收到的消息,之所以出现此错误,常见的原因是:通过调用Response.Write()修改相应时,将启用响应筛选器、HttpModules或服务器追踪。
详细信息:分析附近的“输出内容”时出错。
解决方法如下:
1.如果调用Response.Write()方法的服务器控件在使用UpdatePanel的页面,则只需要在UpdatePanel下增加一个<Triggers>节点,通过PostBackTrigger注册一下改控件就可以了。代码如下:
1. <asp:ScriptManager ID="ScriptManager1" runat="server">
2. </asp:ScriptManager>
3. <asp:UpdatePanel ID="UpdatePanel1" runat="server">
4. <Triggers>
5. <asp:PostBackTrigger ControlID="Button2" /> <!--Button2就是下面那个需要在Button2_Click事件里使用Response.Write()的按钮ID-->
6. </Triggers>
7. <ContentTemplate>
8. <asp:Button ID="Button2" runat="server" OnClick="Button2_Click" Text="Button" />
9. <asp:UpdateProgress ID="UpdateProgress1" runat="server">
10. <ProgressTemplate></ProgressTemplate>
11. </asp:UpdateProgress>
12. </ContentTemplate>
13. </asp:UpdatePanel>
2.但是,如果是在母版页中使用UpdatePanel,则不能通过以上方法来解决,否则或出现类似以下错误:
A control with ID 'btnExport' could not be found for the trigger in UpdatePanel 'UpdatePanel1'.
这主要是UpdatePanel1找不到<asp:PostBackTrigger ControlID="btnExport" />中注册的控件,因为,我们一般没有在母版页中添加这个控件(btnExport)。(当然,如果在UpdatePanel的<ContentTemplate> 节点下添加了ID为btnExport的控件,则不会出错。)
如果出现这样的错误该怎么办呢,我的解决方法是在需要用到Response.Write()方法的控件所在页码的Page_Load事件中添加如下代码:
((ScriptManager)Master.FindControl("ScriptManager1")).RegisterPostBackControl(btnExport);
//ScriptManager1是<asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager>的ID
转载地址:http://www.cnblogs.com/shenyixin/archive/2012/03/08/2385376.html
- 通过调用Response.Write()修改相应时,将启用响应筛选器、HttpModules或服务器追踪。
- 无法分析从服务器收到的消息。之所以出现此错误,常见的原因是: 在通过调用 Response.Write() 修改响应时,将启用响应筛选器、HttpModule 或服务器跟踪。
- 无法分析从服务器收到的消息。之所以出现此错误,常见的原因是: 在通过调用 Response.Write() 修改响应时,将启用响应筛选器、HttpModule 或服务器跟踪。
- 无法分析从服务器收到的消息。之所以出现此错误,常见的原因是: 在通过调用 Response.Write() 修改响应时,将启用响应筛选器、HttpModule 或服务器跟踪。
- 无法分析从服务器收到的消息。之所以出现此错误,常见的原因是: 在通过调用 Response.Write() 修改响应时,将启用响应筛选器、HttpModule 或服务器跟踪
- 无法分析从服务器收到的消息。之所以出现此错误,常见的原因是: 在通过调用 Response.Write() 修改响应时,将启用响应筛选器、HttpModule 或服务器跟踪。
- 无法分析从服务器收到的消息。之所以出现此错误,常见的原因是: 在通过调用 Response.Write() 修改响
- ASP.NET学习笔记[4] - 无法分析从服务器在通过调用 Response.Write()
- Response.Write()方法响应导致页面字体变大
- response响应那些事之PrintWriter,OutputStream;write(),print[ln]()
- response.write()方法将指定的字符创输出到html页面时遇到的问题
- Response.Write
- Response.Write("");
- response.write
- response.write
- Response.Write("");
- response.write损坏css导致TextBox放大或缩小
- 通过response的write留输出数据的问题
- UITabBarController 修改背景
- struts2 在<s:if>中使获取session或request中的内容
- 中医五行简要图片----中医哲学理论基础学习
- JDOM主要使用方法以及类
- AXIS2 独立建立工程
- 通过调用Response.Write()修改相应时,将启用响应筛选器、HttpModules或服务器追踪。
- linux find grep 基本查找和查看文件大小命令
- Android模拟器之间的网络通信
- Tomcat 6 JNDI配置
- iphone 软键盘设置参数说明
- MTK socket 操作之域名解析
- Log4j使用总结
- windbg常用命令
- Base64加密解密算法的C/C++代码实现