Export (0) Print
Expand All

HttpServerUtility.Transfer Method

Terminates execution of the current page and begins execution of a new page for the current request.

Overload List

For the current request, terminates execution of the current page and begins execution of a new page using the specified URL path to the page.

[Visual Basic] Overloads Public Sub Transfer(String)
[C#] public void Transfer(string);
[C++] public: void Transfer(String*);
[JScript] public function Transfer(String);

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.

[Visual Basic] Overloads Public Sub Transfer(String, Boolean)
[C#] public void Transfer(string, bool);
[C++] public: void Transfer(String*, bool);
[JScript] public function Transfer(String, Boolean);

Example

The following example executes a new page in the same directory as the current page.

[Visual Basic] 
Server.Transfer("Logon.aspx")
   

[C#] 
Server.Transfer("Logon.aspx");
   

[C++] 
Server->Transfer(S"Logon.aspx");
   

[JScript] 
Server.Transfer("Logon.aspx")
   

See Also

HttpServerUtility Class | HttpServerUtility Members | System.Web Namespace

Show:
© 2014 Microsoft