Permanent Redirect is new feature ASP.NET 4.0

Posted By  Kirti.M.Darji On 29 Dec 2010 09:12:49
emailbookmarkadd commentsprint
No of Views:566
Bookmarked:0 times
Votes:0 times

Introduction

In this tip, I will show you permanent redirection new feature in asp.net 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:

C# code

Response.RedirectPermanent("ProductDetail.aspx");


you can also see video here know more about PermamentRedirect.I hope it will help you guys,Happy codding.Thank You

Sign Up to vote for this article
Other popular Tips/Tricks
Comments
There is no comments for this articles.
Leave a Reply
Title:
Display Name:
Email:
(not display in page for the security purphase)
Website:
Message:
Please refresh your screen using Ctrl+F5
If you can't read this number refresh your screen
Please input the anti-spam code that you can read in the image.
^ Scroll to Top