Skip to content
Related Articles

Related Articles

ASP Server.Transfer() Method

View Discussion
Improve Article
Save Article
Like Article
  • Last Updated : 23 Dec, 2021

The ASP Server.Transfer Method is used to send all the information that has been created in one asp file to another .asp file. Note that the control will not return to the ASP page from where it was transferred when the second ASP page completes executing its tasks. The transfer includes built-in objects state information. 


Server.Transfer( path )

Parameter Values: This property accepts a single parameter as mentioned above and described below:

  • path: It defines the location of the .asp file to which control should be transferred. It is a required parameter.

Example: Below example demonstrates the method by transferring control from one file to the other.

GFG.asp: This file contains the Server.Transfer() method to transfer the control to the Sudo.asp file.

response.write("Contents of the GFG file<br>")
response.write("Line 2 in File 1<br>")

Sudo.asp: This is the file that the transfer would be handed over to.

response.write("Contents of the Sudo.asp<br>")
response.write("Line 2 in File 2<br>")


Contents of the GFG.asp
Contents of the Sudo.asp
Line 2 in File 2
My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!