GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Microsoft  >  ASP.NET 2.0
Go To First  |  Previous Question  |  Next Question 
 ASP.NET 2.0  |  Question 5 of 161    Print  
What is the difference between Server.Transfer and Response.Redirect? Why would I choose one over the other?

  
Total Answers and Comments: 15 Last Update: September 09, 2008   
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: Leelakrishnan
 

Response.redirect provides a roundtrip to the server and server.transfer does not. For details search microsoft IIS help

Also Response.redirect redirects both the html page as well as the aspx page where as the server.transfer  transfers the  control only to the aspx pages



Above answer was rated as good by the following members:
sridevikj
  Sorting Options  
  Page 1 of 2   « First    1    2    >     Last »  
August 21, 2005 05:38:45   #1  
Rama Krishna        

RE: What is the difference between Server.Transfer and Response.Redirect? Why would I choose one over th...
Server.Transfer is used when redirecting the webpage with in the same applicationwhereasResponse.Redirect is applicabletowards the redirection of webpage between 2 applications

Response.Redirect will instruct browser to call a particular webpage.This will increase one request and one response between the client and server.

 
Is this answer useful? Yes | No
September 01, 2005 15:37:44   #2  
Anil kumar        

RE: What is the difference between Server.Transfer and Response.Redirect? Why would I choose one over th...
i want to add two more comment to the previous one


Resonse.redirect can be used both for aspx and html pages.But server.transfer is only used for aspx pages it will not work for html pages.

Response.redirect will only only get method to post variables form one page to another means we need to give in query string if we want to pass some variables to next page.

But in server.transfer if we selected the second attribute to TRUE then it will post all the variable using the post method.

 
Is this answer useful? Yes | No
September 19, 2005 17:25:56   #3  
Leelakrishnan        

RE: What is the difference between Server.Transfer and...

Response.redirect provides a roundtrip to the server and server.transfer does not. For details search microsoft IIS help

Also Response.redirect redirects both the html page as well as the aspx page where as the server.transfer transfers the control only to the aspx pages


 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
September 23, 2005 09:14:02   #4  
Praveen Kumar        

RE: What is the difference between Server.Transfer and...
Response.Redirect can be used to redirect to external web sites where as the Server.Transfer can be used only to transfer to other pages of the same web site.
 
Is this answer useful? Yes | No
October 06, 2005 07:24:35   #5  
Madhuri.Ch        

RE: What is the difference between Server.Transfer and...
response.redirect necessesitates a round trip to the client and also has no support for encapsulating the code.whereas with a server.transfer we can overcome these overheads because server.transfer gets teh page from the server itself without needing a rountrip to the client.
 
Is this answer useful? Yes | No
October 17, 2005 03:46:55   #6  
Raja Mukherjee        

RE: What is the difference between Server.Transfer and...

Server.transfer transfer the page processing from one page to another page without making a round trip back to the client where as response.redirect redirect to another URL and it make a round trip back to the client.

Server.transfer can not transfer page processing from one page to another if the transferred page is in separate application.


 
Is this answer useful? Yes | No
July 27, 2006 03:56:14   #7  
Manas Behera        

What is the difference between Server.Transfer and...
What is the difference between Server.Transfer and Response.Redirect? Why would I choose one over th
Server.Transfer is used when redirecting the webpage with in the same application whereas Response.Redirect is applicable towards the redirection of webpage between 2 applications

In case of Server.Transfer the browser's history is not updated but in Response.Redirect the browser's history is updated

In case of Server.Transfer the url is not changed but in Response.Redirect the url is changed


 
Is this answer useful? Yes | No
July 28, 2006 13:59:23   #8  
Dhrani        

RE: What is the difference between Server.Transfer and...
i want to add two more comment to the previous one


Resonse.redirect can be used both for aspx and html pages.But server.transfer is only used for aspx pages it will not work for html pages.

Response.redirect will only only get method to post variables form one page to another means we need to give in query string if we want to pass some variables to next page.

But in server.transfer if we selected the second attribute to TRUE then it will post all the variable using the post method.

 
Is this answer useful? Yes | No
August 19, 2006 06:34:48   #9  
shilpa        

RE: What is the difference between Server.Transfer and...
Whenever we use Server.Transfer method it just clears the contents of that page and loads the contents of the page which to be loaded.But url wont change.In Response.Redirect it just redirects to othe pages(url also changes)
 
Is this answer useful? Yes | No
June 10, 2007 05:26:07   #10  
Ranjay Kr. Singh        

RE: What is the difference between Server.Transfer and...
Server.Transfer can be use only. aspx page but Response.Redirect in used both .aspx and html page





Response. Redirect will only get method to post variables form one page to another means we need to give in query string if we want to pass some variables to next page. But in Server.Transfer if we selected the second attribute to TRUE then it will post the entire variable using the post method. Server.Transfer method is quickly way to redirect to another page without round trip.As a result the URL that s display in client browser won t be changed.

 
Is this answer useful? Yes | No
  Page 1 of 2   « First    1    2    >     Last »  


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape