please dont rip this site
Platform SDK: IIS SDK
      [IIS 5.0] [IIS 5.1] [IIS 6.0]

Server.Transfer

The Transfer method sends all of the information that has been assembled for processing by one .asp file to a second .asp file.

Syntax

Server.Transfer( path)

Parameters

Path
The location of the .asp file to which control should be transferred.

Remarks

When you use the Transfer method, the state information for all the built-in objects are included in the transfer. This means that any variables or objects that have been assigned a value in session or application scope are maintained. In addition, all of the current contents for the Request collections are available to the .asp file that is receiving the transfer.

If the path you specify in the input parameter is for an .asp file in another application, the .asp file executes as if it were in the application that contains the Server.Transfer command. In other words, all variables and objects that have been given application scope either by other .asp files in the application or by the application's Global.asa file are available to the called .asp file. However, the path parameter must not contain a query string, or ASP returns an error.

Server.Transfer acts as an efficient replacement for the Response.Redirect method. Response.Redirect specifies to the browser to request a different page. Because a redirect forces a new page request, the browser makes two requests to the Web server, so the Web server handles an extra request. IIS 5.0 introduced a new function, Server.Transfer, which transfers execution to a different ASP page on the server. This avoids the extra request, resulting in better overall system performance, as well as a better user experience.

Example

The following example demonstrates transferring from one .asp file to another, as well as sending the session identifier to the client.

The output from these scripts is:

A session ID

I am going to ASP2

The same session ID

--- ASP1 ---



<HTML><BODY>

  <% Dim sessvar1  Response.Write Session.SessionID

  Response.Write ("<BR>")

  Response.Write("I am going to ASP2 <BR>")

  Server.Transfer("/Myasps/ASP2.asp")

  %>

--- ASP2 ---



<HTML>

<BODY><% Response.Write Session.SessionID%>

</BODY>

</HTML>

Applies To

Server Object

See Also

Requirements

Platforms: Windows 2000 with IIS 5.0 installed, Windows XP with IIS 5.1 installed, Windows Server 2003 family with IIS 6.0 installed

Platform SDK Release: February 2003
What did you think of this topic?
Order a Platform SDK CD


file: /Techref/language/asp/obj/ref_vbom_seromtr.htm, 4KB, , updated: 2003/5/15 13:13, local time: 2024/11/30 01:24,
TOP NEW HELP FIND: 
3.139.83.248:LOG IN

 ©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE!

<A HREF="http://massmind.ecomorder.com/techref/language/asp/obj/ref_vbom_seromtr.htm"> Server.Transfer</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type a nice message (short messages are blocked as spam) in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.


Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?

 

Welcome to ecomorder.com!

 

Welcome to massmind.ecomorder.com!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .