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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Hemant KumarRank #1,202 · 1.5K reputationPosted Oct 24, 2011, 9:23 PM EDT
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.
Satyapriya NayakRank #47 · 31.5K reputationPosted Oct 24, 2011, 10:06 PM EDT
Please refer the below link
http://www.dotnetperls.com/redirectpermanent
Thanks
Prabhu RajaRank #861 · 2.6K reputationPosted Oct 24, 2011, 11:54 PM EDT
Response.RedirectPermanent("/NewURL.aspx");
Check this article :
http://www.c-sharpcorner.com/UploadFile/ashish_2008/1106/