Response.Redirect VS Response.RedirectLocation

  • Thread starter Thread starter cmay
  • Start date Start date
Does anyone know the difference between these two?

Response.Redirect( "http://site.com/newlink.aspx");

and

Response.RedirectLocation = "http://site.com/newlink.aspx";
Response.End();

A fair bit. RedirectLocation just sets the location header. Redirect
sets the header, sets the correct status code, includes a quick
snippet of HTML saying that the resource has moved.

For these sorts of questions, I'd recommend getting hold of Reflector.
It lets you see what's going on inside any code, and it's at my
favourite price (free). (Plus, I've found that the author, Lutz
Roeder, can be vary patient and helpful in explaining why problems I'm
seeing are because I've been such a numpty)

Damien
 
Back
Top