What is the difference between calling Response.Redirect from the codebehind of a page, versus calling HttpContext.Current.Response.Redirect from a shared method on another class?
When I call HttpContext.Current.Response.Redirect it is giving me a 404 error sometimes, when calling Page.Respsone.Redirect doesn’t.
EDIT:
Oops, my mistake, it was a typo.
There is no difference between the two methods (the getter for
Page.Requestsimply returns a reference toHttpContext.Current.Request– you have to dig a bit in Reflector but it’s there) – theHTTP404you see as a result is the response from the server and is totally dependent on the value passed to theRedirectmethod.