Sun
ONE Active Server Pages Product Home Page Developer Site Version
 

ContentsPreviousNextIndex



Remarks: ASP Server Object Transfer Method

The Transfer method is an alternative to using Response.Redirect. When Server.Transfer is called, state information for all ASP built-in objects is included in the transfer from one .asp file to another. The transfer takes place on the server, instead of forcing the browser to redirect to a new page.

When Server.Transfer is called, execution of the first page is terminated and execution of the second page begins. If the first page has started writing to the response buffer, the second page appends to the buffer instead of replacing it. If buffering is on, then HTTP headers can be modified by the ASP file receiving the transfer. If buffering is off, the HTTP headers are not modifiable by the ASP file receiving the transfer, unless content has not yet been sent by ASP. Multiple transfers can be called in succession, thus chaining pages together.

The only data transferred to a second ASP page is the ASP built-in objects and ASPError object values from the first request. Variables declared by the first ASP page are not available in the second ASP page.

When you transfer to a page in another application, the Application and Session objects contain information from the originating application. Accordingly, the ASP page receiving the transfer is treated as part of the originating application.



ContentsPreviousNextIndex