Saturday, December 25, 2010

Permanent Redirect is new feature ASP.NET 4.0

This blog I will show you permanent redirection new feature in 4.0.first we consider why we need permanent redirection of page. the scenario is create on case when you application have two page like product and product detail page in your site,when you go from product page to product detail page using Response .Redirect option,In versions prior to ASP.NET 4.0 that case extra round trip to server first it goes to product page extra round trip (using 302 found) then it goes to product detail page,
overcome this extra round trip issue ASP.NET 4.0 introduce RedirectPermanent() helper method which avoids a round trip and is a permanent redirect (HTTP 301)

Use it as shown below:

you can also see video here know more about PermamentRedirect

I hope it will help you guys,Happy codding.
Thank You

Kirti M.Darji