ASP » Server » Transfer

Version: 3.0

Server.Transfer (Path)
The Path argument is a string specifying either the absolute or relative path of the ASP page being called. The file name must be included in the path. The entire Path must be enclosed inside a pair of quotes.

The Transfer method allows you to transfer all of the state information for all of the built-in objects from one ASP page to another. Unlike the Execute method, when the ASP page that you have transferred to is finished, you do not return the original ASP page.

The Transfer method allows you to transfer from inside one ASP page to another ASP page. All of the state information that has been created for the first (calling) ASP page will be transferred to the second (called) ASP page. This transfered information includes all objects and variables that have been given a value in an Application or Session scope, and all items in the Request collections. For example, the second ASP page will have the same SessionID as the first ASP page.

When the second (called) ASP page completes its tasks, you do not return to the first (calling) ASP page.

In contrast, the Execute method allows you to call another ASP page, and when the called page has completed its tasks, you return to the calling ASP page.

There is one mandatory argument.


Application("name") = "Application Maker"
Application("publishdate") = "05/15/01"
Application("author") = "DevGuru"
Set Application("Obj1") = Server.CreateObject("ADODB.Connection")

Output from CalledAsp.asp
name=Application Maker
OBJ1 is an object.

In this example, the first ASP page (CallingAsp.asp) has no output.

See Also: