asp.net.ph

Server.Transfer Method ( String, Boolean )

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
);

Parameters

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.

Exceptions


Exception Type Condition
HttpException Occurs when the resource cannot be found.

Example

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" );
   
See Also

HttpServerUtility Members   HttpServerUtility.Transfer Overload List Skip Navigation Links




Previous page Back to top Next page

Check out related books at Amazon

© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note