.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month

Home >> Forum >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

What is the difference between Server.Transfer and Response.Redirect

Posted By: Jegan R     Posted Date: November 02, 2010    Points:2   Category :ASP.Net
What is the difference between Server.Transfer and Response.Redirect?

Author: Dhivakaran          Accepted Answer   
Posted Date: November 02, 2010     Points: 10   

-It will not upate the browser URL
-It will redirect within application
-It dosent have round trip

-It will upadte the bowser url
-it will redirct any page external page also(yahoo,gmail)
-Has round trip

Dhivakaran T
Author: kavitha             
Posted Date: November 07, 2010     Points: 5   

difference between Server.Transfer and Response.Redirect


It is very similar to server.Transfer. The main difference is the posted pervious page values can't be accessable. Here also the data can pass through server variables and query string. It simply redirect the page from one page to another.

Eg: Response.Redirect("Page2.aspx")

Note: But the pervious page values can't be accessable by Response.Redirect().


Server.Transfer() helps the one less round trip. The main advantage of this transfer the first page to second page with better performance. The data can pass through variables, query string and also can retrive from the previous page control value.

Eg: Server.Transfer("Page2.aspx");

Author: Mallikarjuna Chigicherla             
Posted Date: November 22, 2010     Points: 5   

Server.Transfer Can move one page to Another page if that
page is in same website.

if Default.aspx, Default2.aspx Are in the same Website
then we can:

//By this we can navigate to Default2.aspx

Without changing the Url:

But if we write:

it cannot navigate to That requeste page

where as
Response.Redirect Can navigate to Other pages



Thanks & Regards,
Mallikarjuna Chigicherla

Post Reply

You must Sign In To post reply
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend