Cómo crear 303 respuesta en ASP.NET
-
14-11-2019 - |
Pregunta
¿Alguien sabe cómo redirigir la solicitud actual en ASP.NET utilizando el código de estado HTTP 303 (se puede ver).
¡Los fragmentos de código son más que bienvenidos!
Solución
Deberías poder hacerlo así:
HttpContext.Current.Response.Clear();
HttpContext.Current.Response.Status = "303 See Other";
HttpContext.Current.Response.AddHeader("Location", newLocation);
HttpContext.Current.Response.End();
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow