Posts

Showing posts from October 17, 2010

ASP.NET 4.0 Feature - Response.RedirectPermanent() Method

Let us see the new feature in ASP.NET 4.0 known as the “Response.RedirectPermanent”. We have seen in the past where we use the “Response.Redirect” method to redirect to the requested Url to specified Url, this uses the HTTP 302 status code which is temporary redirect. This leads to a round trip from requested Url to specified Url when the user hits the requested Url. Now we have the “Response.RedirectPermanent” which uses the HTTP 301 status code which is a permanent redirect. This enables the search engines to store all the permanent redirects and index it which enables in searching it faster. The Syntax is Response.RedirectPermanent(“NewTitles.aspx”); Hope this was cool feature. Please add your comments or suggestions. Cheers!!!