RedirectPermanent in ASP.NET
What is RedirectPermanent in ASP.NET 4.0?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Prabhu RajaPosted Oct 25, 2011, 3:54 AM
Response.RedirectPermanent("/NewURL.aspx");
Check this article :
http://www.c-sharpcorner.com/UploadFile/ashish_2008/1106/
Satyapriya NayakPosted Oct 25, 2011, 2:06 AM
Please refer the below link
http://www.dotnetperls.com/redirectpermanent
Thanks
Hemant KumarPosted Oct 25, 2011, 1:23 AM
ASP.NET 4.0 introduces some SEO improvements. Response has now new method calledRedirectPermanent(). This method performs same redirect as Response.Redirect() but it uses response code 301. You can find more information about HTTP response codes from HTTP 1.1 specification, chapter 10. Status Code Definitions.
Response.Redirect() returns 302 to browser meaning that asked resource is temporarily moved to other location. Permanent redirect means that browser gets 301 as response from server. In this case browser doesn't ask the same resource from old URL anymore – it uses URL given by Location header.
To illustrate difference between Response.Redirect() and Response.RedirectPermanent() let's look at simple example. We need one usual ASP.NET Web Application with Global.asax file. In Global.asax file we have to implement BeginRequest() method.
{{{