如何在ASP.NET中创建303响应
-
14-11-2019 - |
题
有谁知道如何在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();
. 不隶属于 StackOverflow