获取Sys.WebForms.PageRequestMangerParserErrorException [英] Getting Sys.WebForms.PageRequestMangerParserErrorException

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

问题描述

我正在获取Sys.WebForms.PageRequestMangerParserErrorException:无法解析从服务器收到的消息.导致此错误的常见原因是通过调用Reesponse.Write()修改了响应,响应过滤器,HttpMOdules或服务器跟踪已启用.

详细信息:附近解析错误
< html>
< head>


A)我的母版页中有scriptmanger

I am getting Sys.WebForms.PageRequestMangerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Reesponse.Write(), response filters, HttpMOdules, or server trace is enabled.

Details: Error parsing near
<html>
<head>


A) i have scriptmanger in my master page

<asp:ScriptManager ID="ScriptManagerMaster" EnablePageMethods ="true" runat="server"> 



B)这是我在页面中使用updatePanel的地方



B)This is where i m using the updatePanel in my page

<asp:UpdatePanel id="UpdatePanel1" runat="server" UpdateMode="conditional">
<contenttemplate><asp:DropDownList id="ddlSatellite" AutoPostBack ="true" runat="server"  OnSelectedIndexChanged = "ddlSatellite_SelectedIndexChanged" Height="20px" Width="137px" Font-Names="calibri, 10pt" Font-Size="10pt"  >    
<asp:TextBox id="txtSatelliteLongitude" runat="server" > </contenttemplate>



检查完成了我的任务:
1.我没有在代码中使用Response.write
2.同样在webconfig或page指令中不使用任何跟踪

请帮忙.



Checking done my me:
1. I have not used Response.write in my code
2. Also no trace is used in webconfig or page directive

Please help.

推荐答案

检查以下原因,并获得更多详细信息.
http://weblogs.asp.net/leftslipper/archive/2007/02/26/sys-webforms-pagerequestmanagerparsererrorexception-what-it-is-and-how-to-avoid-it.aspx [
Check following reasons, and get some more details.
http://weblogs.asp.net/leftslipper/archive/2007/02/26/sys-webforms-pagerequestmanagerparsererrorexception-what-it-is-and-how-to-avoid-it.aspx[^]

Why do I keeping getting a PageRequestManagerParserErrorException?

Well, chances are you''re doing one of the things mentioned in the error message. Here are the most common reasons and why they don''t work:

Calls to Response.Write():
By calling Response.Write() directly you are bypassing the normal rendering mechanism of ASP.NET controls. The bits you write are going straight out to the client without further processing (well, mostly...). This means that UpdatePanel can''t encode the data in its special format.

Response filters:
Similar to Response.Write(), response filters can change the rendering in such a way that the UpdatePanel won''t know.

HttpModules:
Again, the same deal as Response.Write() and response filters.

Server trace is enabled:
If I were going to implement trace again, I''d do it differently. Trace is effectively written out using Response.Write(), and as such messes up the special format that we use for UpdatePanel.

Calls to Server.Transfer():
Unfortunately, there''s no way to detect that Server.Transfer() was called. This means that UpdatePanel can''t do anything intelligent when someone calls Server.Transfer(). The response sent back to the client is the HTML markup from the page to which you transferred. Since its HTML and not the special format, it can''t be parsed, and you get the error.


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

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