문제

Does anyone know how to redirect current request in ASP.NET using http status code 303 (SeeOther).

Code snippets are more than welcome!

도움이 되었습니까?

해결책

You should be able to do it like this:

  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