1 out of 8 rated this helpful - Rate this topic

HttpServerUtility.Transfer Method

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

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

  Name Description
Public method Transfer(String) For the current request, terminates execution of the current page and starts execution of a new page by using the specified URL path of the page.
Public method Transfer(String, Boolean) Terminates execution of the current page and starts execution of a new page by using the specified URL path of the page. Specifies whether to clear the QueryString and Form collections.
Public method Transfer(IHttpHandler, Boolean) Terminates execution of the current page and starts execution of a new request by using a custom HTTP handler that implements the IHttpHandler interface and specifies whether to clear the QueryString and Form collections.
Top
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
This member is overloaded.
This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.
what is different from Redirect Command?
what is the difference between HttpServerUtility.Transfer and Document.Redirect

Answer:
The Server.Transfer preserves the current QueryString and Form objects when it passes control to the new page.
The Response.Redirect throws everything out and redirects to a new page.
Note: Session is not available
If you use Server.Transfer then session is not enabled. Does anyone know why or how to enable it again?