Response.Redirect VS Response.RedirectLocation

D

Damien

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top