Difference between Server.Transfer() And Response.Redirect()

B

batista

Hello All,

I want to know the Difference Between

Server.Transfer() And Response.Redirect()?
 
G

Guest

Response.Redirect() send a "move" command to the client that sends it to the
new page.

Server.Transfer() does this at the server level.
 
S

S. Justin Gengo

Batista,

When a Response.Redirect is fired the client has posted back to the server
(let's use a post back from a hypothetical "Page1.aspx" for this example)
and then the server sends back the "Page1.aspx" response to the client
machine which tells the client to move to the new page, Page2.aspx.

With Server.Transfer the client posts back to the server, Page1.aspx, but
instead of sending back Page1.aspx, the server compiles and sends back
Page2.aspx circumventing the trip to the client. As far as the client
browser knows it's still on Page1.aspx.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
 
S

Sharon

Server.Transfer() transfers control, on the server, to another page.
Response.Redirect() sends redirect to the client.
In other words, Server.Transfer() transfers to another page without
involving the client.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,071
Latest member
MetabolicSolutionsKeto

Latest Threads

Top