Difference Between Server.Transfer and Response.Redirect?


Server.Transfer

1. It is used when redirecting the webpage within the same application.

2. As the redirection takes place from server, it has no round trips from server to client.

3. It is faster compare to Response.Redirect.

4. It adds NO history log on browser.

5. It preserves Query String and Form Variables from the original request.

e.g


Server.Transfer("WebPage2.aspx")

Response. Redirect

1. It is applicable towards the redirection of webpage between 2 different applications.

2. It will instruct browser to call a particular webpage. This will increase one request and one response between the client and server.

3. It is slower compare to Server.Transfer because of network roundtrips.

4. It adds history log on browser.

5. It doesn’t preserve Query String and Form Variables from the original request.

e.g


Response.Redirect("http://www.anotherwebsite.com/Default.aspx")

One comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s