NCS Logo - Click for home page Northstar Developer Center
Platforms
All Platforms
.NET Framework (1.x - 4.x)
Active Server Pages
ASP.NET
C#
SQL Server
VB.NET
Visual Basic

Keywords
.NET Data Types
.NET E-mail
.NET Events
.NET Functions
.NET Object Programming
.NET System.Configuration
.NET System.Diagnostics
.NET System.IO
.NET System.Net
.NET System.Net.Sockets
Active Data Objects
ASP Architecture
ASP Black Belt
ASP Built-in Functions
ASP Built-in Objects
ASP Debugging
ASP Performance
ASP Security
ASP Syntax
ASP.NET Authentication
ASP.NET Controls
ASP.NET Data Access
ASP.NET Features
ASP.NET Master Pages
ASP.NET Page Events
ASP.NET Security
ASP.NET ViewState
Atom
Certifications
COM, DCOM, COM+
Data Access
E-Mail
Errors
Exporting Data
HTML Tips
IIS
Object-Oriented Programming
RSS
SQL
Uncategorized ASP Tips
VB API Programming
VB Forms
VB Syntax
XML

Book Support
Visual Basic 6 Bible
ASP Bible
ASP Weekend Crash Course
ASP.NET At Work
Creating Web Services

Server.Transfer vs. Response.Redirect

Written by Eric Smith, Northstar Computer Systems LLC

A user sent me this blurb out of Wrox's ASP 3.0 Programmer's Reference regarding the differences between Server.Transfer and Response.Redirect:

The current page's context is also passed to the target page or resource. This includes the values of all the variables in all the intrinsic ASP objects, such as the collections of the Request, Response, and Session objects, and all their properties. The Application object context is also transferred, even if the page is within a different virtual application. The current transaction context is also passed to the new page, allowing it to take part seamlessly in any current transaction.

Meanwhile, the browser's address bar still shows the original URL, and the Back, Forward, and Refresh buttons work normally. When we use client-side redirection, especially with an HTML meta tag, this usually isn't the case.

However, the values of any script variables or object references that were created or set within the first page are not available within the new page.

One other major difference is that because Server.Transfer doesn't require the client to request another page, it can be faster in some cases, depending on what you're doing.

Keywords: [ ASP Built-in Objects ]

Publication Date: 11/1/2000