System.Web Namespace HttpServerUtility Class
Terminates execution of the current page and begins execution of a new page using the specified URL path to the page. Specifies whether to clear the QueryString and Form collections.
[ VB ]
Overloads Public Sub Transfer ( _
ByVal path As String, _
ByVal preserveForm As Boolean _
)
[ C# ]
public void Transfer (
string path,
bool preserveForm
);
[ C++ ]
public: void Transfer (
String* path,
bool preserveForm
);
[ JScript ]
public function Transfer (
path : String,
preserveForm : Boolean
);
- path
- The URL path of the new page on the server to execute.
- preserveForm
- If true, the QueryString and Form collections are preserved. If false, they are cleared. The default is false.
Exception Type |
Condition |
HttpException |
Occurs when the resource cannot be found. |
The following example executes a new page in the same directory as the current page.
[ VB ]
Server.Transfer ( "Logon.aspx" )
[ C# ]
Server.Transfer ( "Logon.aspx" );
HttpServerUtility Members HttpServerUtility.Transfer Overload List