gpt4 book ai didi

c# - .NET 4.0 中的 Response.Redirect

转载 作者:太空狗 更新时间:2023-10-29 20:01:55 26 4
gpt4 key购买 nike

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

  • Response.Redirect() 在更新面板中使用
  • 我们使用 AjaxToolKit 4.0

它给我错误:

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

最佳答案

你必须这样做

string redirectURL=(a proper url goes here)

string script = "window.location='" + redirectURL + "';";

ScriptManager.RegisterStartupScript(this, typeof(Page), "RedirectTo", script, true);

关于c# - .NET 4.0 中的 Response.Redirect,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5858978/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com