Reponse.Redirect ()

R

RayAll

I have used a response.redirect() in the first page of my weblog to transfer
it to anther page,but it seemes to be slow.Is there a workaround (probably
Server.Transfer???)???

Thanks
 
S

Steve C. Orr [MVP, MCSD]

Yes, Server.Transfer is the more efficient cousin of Response.Redirect.

Response.Redirect requires an extra round trip to the client and back, which
is why it's less efficient.
Server.Transfer has its own set of tradeoffs though, such as the fact that
the URL displayed in the user's browser will not be the same as the server
page that is being displayed. In some cases that can be good, but more
often it causes development annoyances.
 
R

RayAll

What do you mean by dynamic page?you mean interms of getting Queryparameters
and bluh bluh ...? my first page is an aspx page which connects to database.

Thanks
 
R

RayAll

thanks
Steve C. Orr said:
Yes, Server.Transfer is the more efficient cousin of Response.Redirect.

Response.Redirect requires an extra round trip to the client and back,
which is why it's less efficient.
Server.Transfer has its own set of tradeoffs though, such as the fact that
the URL displayed in the user's browser will not be the same as the server
page that is being displayed. In some cases that can be good, but more
often it causes development annoyances.
 
G

Gabriel Lozano-Morán

Well in that case you should indeed use Server.Transfer() unless the first
page and the second page are on seperate servers then you should use
Response.Redirect() because the Server.Transfer() method used the
Request.MapPath() method to retrieve the path of the second page meaning
that the method expects the second page to be on the same server.

Gabriel Lozano-Morán
Software Engineer
Sogeti
 

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

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top