YouTip LogoYouTip

Met Transfer

# ASP Transfer Method * * Complete Server Object Reference](#) * * * The Transfer method sends (transfers) all state information created in one ASP file (all application/session variables and all items in the request collections) to another ASP file. When the second ASP file has finished processing, it does not return to the first ASP page. **Note:** The Transfer method is an efficient alternative to Response.Redirect. When the Server.Transfer method transfers execution to another ASP page on the server, a redirect forces the web server to handle an extra request, avoiding the extra round trip. ### Syntax Server.Transfer(path) | Parameter | Description | | --- | --- | | path | Required. The location of the ASP file. Control is transferred to this ASP file. | ### Example File1.asp: <% response.write("Line 1 in File 1
") Server.Transfer("file2.html") response.write("Line 2 in File 1
") %> File2.asp: <% response.write("Line 1 in File 2
") response.write("Line 2 in File 2
") %> Output: Line 1 in File 1 Line 1 in File 2 Line 2 in File 2 See the Server.Execute method to learn the difference between Server.Transfer and Server.Execute. * * Complete Server Object Reference](#)
← Met UrlencodeMet Mappath β†’