有谁知道如何在ASP.NET 中使用HTTP状态代码303将当前请求重定向当前请求(ethother)。

代码片段超过欢迎!

有帮助吗?

解决方案

你应该这样做:

  HttpContext.Current.Response.Clear();
  HttpContext.Current.Response.Status = "303 See Other";
  HttpContext.Current.Response.AddHeader("Location", newLocation);
  HttpContext.Current.Response.End();
.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top