System.Web.HttpServerUtility.Transfer C# (CSharp) Method

Transfer() public method

public Transfer ( string path ) : void
path string
return void
		public void Transfer (string path)
		{
			Transfer (path, true);
		}

Same methods

HttpServerUtility::Transfer ( IHttpHandler handler, bool preserveForm ) : void
HttpServerUtility::Transfer ( string path, bool preserveForm ) : void

Usage Example

		/**
		 * Transfers control to the Error page using Server.Transfer, and displays some error information.
		 * 
		 * header: The error page header, ex. "Page not found". HTML in the string is not escaped.
		 * description: A description of the error, ex. "Path /foo/bar.txt not found". HTML in the string is not escaped.
		 * code: The response code of the page, ex. 404.
		 */
		public static void transferToError(HttpServerUtility server, HttpContext context, string header, string description, int code) {
			context.Items.Clear ();
			context.Items ["ErrorPage_title"] = header;
			context.Items ["ErrorPage_desc"] = description;
			context.Items ["ErrorPage_code"] = code;
			server.Transfer ("~/ErrorPage.aspx", false);
		}
All Usage Examples Of System.Web.HttpServerUtility::Transfer