In versions prior to ASP.NET 4.0, you could redirect between two pages, let us say from Default.aspx to About.aspx using Response.Redirect(“About.aspx”).
This caused an extra round trip to the server when users requested for Default.aspx and were then redirected to About.aspx. Moreover this is a temporary redirect (HTTP 302) as shown below using FireBug
ASP.NET 4.0 introduces the RedirectPermanent() helper method which avoids a round trip and is a permanent redirect (HTTP 301) as shown below
Use it as shown below:
If you are new to Temporary and Permanent Redirect, read Redirects: Permanent 301 vs. Temporary 302
Giving me +1 tells me you liked this article! Thanks in advance
Did you like this post?
|Save on Delicious|
|subscribe via rss||subscribe via e-mail|
|print this post||follow me on twitter|