近来一个项目遇到修改的应用,
原有项目应用到了第三方控件:SolpartMenu ,我在用updatepanel处理问题时,遇到了“Sys.WebForms.PageRequestManagerParserErrorException intermittent exception”
,网络上一些解释主要是:
Ajax 中的Sys.Webforms.PageRequestManagerParseErrorException异常处理
问题:pagerequestmanagerparseErrorException: the message received from the server could 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 '
问题:pagerequestmanagerparseErrorException: the message received from the server could 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 '
<!DOCTYPE html '.
处理参考之一:
该异常一般是由于在updatepanel中的事件响应中出现了类似Response.Redirect;Server.Transfer进行页面跳转的语句
该异常一般是由于在updatepanel中的事件响应中出现了类似Response.Redirect;Server.Transfer进行页面跳转的语句
处理方法:在updatepanel中加入如下红色代码:
<ajax:UpdatePanel runat="server" ID="UpdatePanel1"> <ContentTemplate> </ContentTemplate> <Triggers> <asp:PostBackTrigger ControlID="控件ID" /> </Triggers> <ajax:UpdatePanel>
,根据大的方向,我确定,SolpartMenu 生成过程中应用到了,Response.Write(等方法,
根据反编译代码查看 它的源码,最终完成BUG,只需要
head之间加,<style type="text/css" id="style1" runat="server"> </style>
cs端加:SolpartMenu2.MenuCSSPlaceHolderControl = "style1"
就可以解决AsyncPostBackTrigger的问题。
希望能给大家一点提示