本文共 714 字,大约阅读时间需要 2 分钟。
这两种PostBackTrigger有什么不同?
问题描述:当程序调用Response.write不能正常显示,报出如下错误: 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 '<script language=jav'. 原因: 由于页面中加入了UpdatePanel,而且按钮的事件在UpdatePanel里面且有类似Response.write("<script>window.open('ceshi.aspx')</script>")语句。 解决办法: 将按钮置于UpdatePanel外,在UpdatePanel的属性中添加PostBackTrigger,ControlID为该按钮即可。
原帖地址:
转载地址:http://gaovb.baihongyu.com/