By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,984 Members | 1,386 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,984 IT Pros & Developers. It's quick & easy.

Response.Redirect VS Response.RedirectLocation

P: n/a
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();

Jun 1 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On Jun 1, 3:46 am, cmay <c...@walshgroup.comwrote:
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

Jun 1 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.