Name

Transfer — Server.Transfer (strPath )

Synopsis

The Transfer method allows the developer to redirect execution from one script to another script without an HTTP response being sent to the client. All information from the first script, including values in the Request and other objects, is available in full to the second script. Unlike Server.Execute, Server.Transfer does not return control to the script that called the Transfer method when the called ASP page has Finished executing. The method is new to ASP 3.0/IIS 5.0.

Parameters

strPath

The relative or absolute path to the second script to which execution will be redirected.

Example

******** BEGIN Transfer Example: First Script ******** <% ' Transfer Example: First Script ' First Script calls Second Script, which uses Transfer ' to redirect execution to Third Script. %> <HTML> <HEAD> <TITLE> Server.Transfer Example </TITLE> </HEAD> <BODY> <FORM ACTION="TransferExample_Process1.asp?qsvalue=hannah1" METHOD="post"> First Name: <INPUT TYPE="text" NAME="txtFName" VALUE=""><BR> Last Name: <INPUT TYPE="text" NAME="txtLName" VALUE=""><BR> Address: <INPUT TYPE="text" NAME="txtAddress" VALUE=""><BR> City: <INPUT TYPE="text" NAME="txtCity" VALUE="">&nbsp State: <INPUT TYPE="text" NAME="txtState" VALUE=""><BR> Zipcode: <INPUT TYPE="text" NAME="txtZipcode" VALUE=""><BR> <INPUT TYPE="submit" VALUE="Submit"> </FORM> </BODY> </HTML> ******** END Transfer Example: First Script ******** ******** BEGIN Transfer Example: Second Script ******** <% ...

Get ASP in a Nutshell, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.