This documentation is archived and is not being maintained.

HttpServerUtility.TransferRequest Method (String, Boolean)

Performs an asynchronous execution of the specified URL and preserves query string parameters.

Namespace: System.Web
Assembly: System.Web (in system.web.dll)

public void TransferRequest (
	string path,
	bool preserveForm
public void TransferRequest (
	String path, 
	boolean preserveForm
public function TransferRequest (
	path : String, 
	preserveForm : boolean
Not applicable.



The URL path of the new page on the server to execute.


true to preserve the QueryString and Form collections; false to clear the QueryString and Form collections.

Exception typeCondition


The request requires the integrated pipeline mode of IIS 7.0.


The server is not available to handle the request.


The path parameter is a null reference (Nothing in Visual Basic).

This overload calls the TransferRequest overload with the preserveForm parameter set to the value passed in, the method parameter set to a null reference (Nothing in Visual Basic), and the headers parameter set to a null reference (Nothing in Visual Basic). For more information, see the "Remarks" section of the TransferRequest overload.

TransferRequest is introduced in the .NET Framework version 3.5. For more information, see The .NET Framework 3.5 Architecture.

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0