Reponse.Redirect ()

  • Thread starter Thread starter RayAll
  • Start date Start date
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
 
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.
 
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
 
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.
 
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
 
Back
Top