here/a>./p>
/p>
With the new features
in Dot net framework 3.5 we could have easily made this much simpler by
adding an extension methods to the response class and make it look
simple.
public void PermanentRedirect(this HttpResponse response, string destination)/p>
{/p>
response.Status = "301 Moved permanently";/p>
response.AddHeader("Location", destination);/p>
response.End();/p>
}/p>
/p>
In the above code we
have added a simple Extension method to the HttpResponse class. What
this method does is always makes the redirect to a new page Permanent
by adding appropriate response header./p>
/p>
Hence after this extension method we can easily makes call like Response.PermanentRedirect(“http:////www.vikramlakhotia.com”);
After
looking at the importance of this functionality Microsoft has decided
to add this functionality in the Asp.net framework itself. Now with
Asp.net 4.0 new RedirectPermanent helper method that makes it easy to
issue HTTP 301 moved permanently responses/p>
/p>
Vikram/p>
/div>