如何在asp.net中创建303响应

有谁知道如何使用http状态代码303 (参见其他)在ASP.NET中重定向当前请求。

代码片段非常受欢迎!

你应该能够这样做:

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