的Response.Redirect在.NET 4.0中 [英] Response.Redirect in .NET 4.0

查看:157
本文介绍了的Response.Redirect在.NET 4.0中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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

它给我的错误:

  

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

解决方案

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

<一个href="http://forums.asp.net/t/1539851.aspx/1?Response+Redirect+not+working+on+an+UpdatePanel+if+redirecting+to+a+ClickOnce+application+in+some+cases+" rel="nofollow">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

<一个href="http://stackoverflow.com/questions/1554728/the-message-received-from-the-server-could-not-be-parsed-common-causes-for-this">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

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.

这篇关于的Response.Redirect在.NET 4.0中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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