的Response.Redirect在.NET 4.0中Redirect、Response、NET

2023-09-04 09:13:42 作者:奶味娃娃机

的Response.Redirect()不再工作时,应用程序升级到ASP.NET 4.0

的Response.Redirect()用于更新面板内 我们使用 AjaxToolKit 4.0

它给我的错误:

  

错误:Sys.WebForms.PageRequestManagerParserErrorException:从收到的消息       服务器无法解析。此错误的常见原因是当响应       通过调用修改的Response.Write(),响应滤波器,的HttpModules,或服务器跟踪是       启用。       详细信息:错误附近解析

解决方案

的UpdatePanel不支持resonse.redirect asynchronousely。您应该完全回发的页面,或避免使用它。

http://forums.asp.net/t/1539851.aspx/1?Response+Redirect+not+working+on+an+UpdatePanel+if+redirecting+to+a+ClickOnce+application+in+some+cases+

http://forums.asp.net/t/1392827.aspx

The从服务器接收到的消息无法解析。此错误的常见原因是当响应是通过调用修改的Response.Write(),响应滤波器,的HttpModules,或服务器跟踪已启用。

Response.Redirect() no longer working when upgrade the application to ASP.NET 4.0

Response.Redirect() is used inside Update panel and we using the AjaxToolKit 4.0 ASP.NET中Response.Redirect 方法深度剖析

it gives me the error:

Error: Sys.WebForms.PageRequestManagerParserErrorException: 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

解决方案

UpdatePanel doesn't support resonse.redirect asynchronousely. You should either completely postback the page or avoid using it.

http://forums.asp.net/t/1539851.aspx/1?Response+Redirect+not+working+on+an+UpdatePanel+if+redirecting+to+a+ClickOnce+application+in+some+cases+

http://forums.asp.net/t/1392827.aspx

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.