Click here to Skip to main content
15,891,431 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Breakpoint doesn't hit Pin
Manas Bhardwaj7-Sep-09 2:50
professionalManas Bhardwaj7-Sep-09 2:50 
GeneralRe: Breakpoint doesn't hit Pin
amreg14-Sep-09 20:56
amreg14-Sep-09 20:56 
AnswerRe: Breakpoint doesn't hit Pin
Abhishek Sur7-Sep-09 3:16
professionalAbhishek Sur7-Sep-09 3:16 
QuestionDifference between Response.redirectpermanent and server.transfer Pin
yadlaprasad7-Sep-09 2:18
yadlaprasad7-Sep-09 2:18 
AnswerRe: Difference between Response.redirectpermanent and server.transfer Pin
Manas Bhardwaj7-Sep-09 2:47
professionalManas Bhardwaj7-Sep-09 2:47 
GeneralRe: Difference between Response.redirectpermanent and server.transfer Pin
yadlaprasad7-Sep-09 3:00
yadlaprasad7-Sep-09 3:00 
GeneralRe: Difference between Response.redirectpermanent and server.transfer Pin
Manas Bhardwaj7-Sep-09 5:17
professionalManas Bhardwaj7-Sep-09 5:17 
AnswerRe: Difference between Response.redirectpermanent and server.transfer Pin
Abhishek Sur7-Sep-09 10:09
professionalAbhishek Sur7-Sep-09 10:09 
Response.RedirectParmanent is an extension function introduced in .NET 4.0.
The main motive of it is to indicate the Response Code to the Search Engine that the page is moved permanently. The Response.Redirect generates Response code as 302 whereas RedirectParmanent returns 301.

Thus say you have a page, and which is included to search engine for a long time, if you use Response.Redirect() it will not change this effect to the search engine(taking this a temporary change), while if you use Response.RedirectParmanent() it will take it as permanent.

In case of Server.Transfer() the actual response is actually been updated. There is no effect to the search engine, and search engine will think the output is coming from the same page that is called upon. Let us give an example :

Say you have 2 pages (Page 1 and Page 2) where Page1 redirects to Page2
In case of

1. Response.Redirect() : Search Engine will take this redirection as Temporary(Status 301) and always keep Page1 in its cache.
2. Response.RedirectParmanent() : Search Engine will take this a permanent redirection(Status 302) and will remove Page1 from its database and include Page2 for better performance on search.
3. Server.Transfer() : Search Engine will be unaware of any redirection been took place (Status 200) and will keep Page1 to its database. It will think Page1 is producing the output response of Page2.

When to use:
Response.Redirect is perfect when your page is temporarily changed and will be changed to original within a short span of time.
Response.RedirectParmanent() when you are thinking of deleting the Page1 totally after the search engines changes its cache.
Server.Transfer() when you are thinking of keeping the page for ever, and to let search engine unaware of this redirection.

Abhishek Sur

My Latest Articles
Create CLR objects in SQL Server 2005
C# Uncommon Keywords
Read/Write Excel using OleDB

Don't forget to click "Good Answer" if you like to.

GeneralRe: Difference between Response.redirectpermanent and server.transfer Pin
Viral Upadhyay7-Sep-09 19:16
Viral Upadhyay7-Sep-09 19:16 
GeneralRe: Difference between Response.redirectpermanent and server.transfer Pin
Abhijit Jana7-Sep-09 20:03
professionalAbhijit Jana7-Sep-09 20:03 
GeneralRe: Difference between Response.redirectpermanent and server.transfer Pin
yadlaprasad7-Sep-09 20:14
yadlaprasad7-Sep-09 20:14 
GeneralRe: Difference between Response.redirectpermanent and server.transfer Pin
Abhijit Jana7-Sep-09 21:25
professionalAbhijit Jana7-Sep-09 21:25 
GeneralRe: Difference between Response.redirectpermanent and server.transfer Pin
Abhishek Sur8-Sep-09 12:34
professionalAbhishek Sur8-Sep-09 12:34 
AnswerRe: Difference between Response.redirectpermanent and server.transfer Pin
HimaBindu Vejella27-Jan-10 20:21
HimaBindu Vejella27-Jan-10 20:21 
QuestionHow to allow "&" character in URL Pin
meghamaharshi7-Sep-09 2:17
meghamaharshi7-Sep-09 2:17 
AnswerRe: How to allow "&" character in URL Pin
SeMartens7-Sep-09 2:40
SeMartens7-Sep-09 2:40 
AnswerRe: How to allow "&" character in URL Pin
Abhishek Sur7-Sep-09 5:33
professionalAbhishek Sur7-Sep-09 5:33 
QuestionTransfer excel data to oracle Pin
amittinku7-Sep-09 2:01
amittinku7-Sep-09 2:01 
AnswerRe: Transfer excel data to oracle Pin
Robert_Pan7-Sep-09 2:04
Robert_Pan7-Sep-09 2:04 
GeneralRe: Transfer excel data to oracle Pin
amittinku7-Sep-09 2:27
amittinku7-Sep-09 2:27 
GeneralRe: Transfer excel data to oracle Pin
amittinku7-Sep-09 2:36
amittinku7-Sep-09 2:36 
AnswerRe: Transfer excel data to oracle Pin
r a m e s h7-Sep-09 2:44
r a m e s h7-Sep-09 2:44 
GeneralRe: Transfer excel data to oracle Pin
amittinku7-Sep-09 2:54
amittinku7-Sep-09 2:54 
QuestionHow to publish asp.net website in localhost Pin
vasanth arivali7-Sep-09 1:28
vasanth arivali7-Sep-09 1:28 
AnswerRe: How to publish asp.net website in localhost Pin
Manas Bhardwaj7-Sep-09 1:33
professionalManas Bhardwaj7-Sep-09 1:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.