System.Web Namespace HttpServerUtility Class
Executes a request to another page using the specified URL path to the page.
[ VB ]
Overloads Public Sub Execute ( _
ByVal path As String _
)
[ C# ]
public void Execute (
string path
);
[ C++ ]
public: void Execute (
String* path
);
[ JScript ]
public function Execute (
path : String
);
- path
- The URL path of the new request.
Exception Type |
Condition |
HttpException |
Occurs when Current Context is a null reference ( Nothing in Visual Basic ) ( Nothing in Visual Basic ). |
ArgumentNullException |
Occurs when path is a null reference ( Nothing in Visual Basic ) ( Nothing in Visual Basic ). |
The Execute method continues execution of the original page after execution of the new page is completed. The Transfer method unconditionally transfers execution to another page.
The following example displays an informational page. Control will return to the original page after updateinfo.aspx is displayed.
[ VB ]
Server.Execute ( "http://www.contoso.com/updateinfo.aspx" )
[ C# ]
Server.Execute ( "http://www.contoso.com/updateinfo.aspx" );
HttpServerUtility Members HttpServerUtility.Execute Overload List