Reponse.Redirect ()

Discussion in 'ASP .Net' started by RayAll, Apr 18, 2005.

  1. RayAll

    RayAll Guest

    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
     
    RayAll, Apr 18, 2005
    #1
    1. Advertising

  2. 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.

    --
    I hope this helps,
    Steve C. Orr, MCSD, MVP
    http://SteveOrr.net


    "RayAll" <> wrote in message
    news:...
    >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
    >
     
    Steve C. Orr [MVP, MCSD], Apr 18, 2005
    #2
    1. Advertising

  3. If the first page doesn't have to be a dynamic page you can always use
    Javascript:

    <head>

    <script language="JavaScript">

    window.location="http://www.yourdomain.com/yoursecondpage.asp";

    </script>

    </head>

    Gabriel Lozano-Morán

    Software Engineer

    Sogeti


    "RayAll" <> wrote in message
    news:...
    >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
    >
     
    Gabriel Lozano-Morán, Apr 18, 2005
    #3
  4. RayAll

    RayAll Guest

    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
    "Gabriel Lozano-Morán" <> wrote in message
    news:...
    > If the first page doesn't have to be a dynamic page you can always use
    > Javascript:
    >
    > <head>
    >
    > <script language="JavaScript">
    >
    > window.location="http://www.yourdomain.com/yoursecondpage.asp";
    >
    > </script>
    >
    > </head>
    >
    > Gabriel Lozano-Morán
    >
    > Software Engineer
    >
    > Sogeti
    >
    >
    > "RayAll" <> wrote in message
    > news:...
    >>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
    >>

    >
    >
     
    RayAll, Apr 18, 2005
    #4
  5. RayAll

    RayAll Guest

    thanks
    "Steve C. Orr [MVP, MCSD]" <> wrote in message
    news:...
    > 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.
    >
    > --
    > I hope this helps,
    > Steve C. Orr, MCSD, MVP
    > http://SteveOrr.net
    >
    >
    > "RayAll" <> wrote in message
    > news:...
    >>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
    >>

    >
    >
     
    RayAll, Apr 18, 2005
    #5
  6. 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

    "RayAll" <> wrote in message
    news:...
    > 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
    > "Gabriel Lozano-Morán" <> wrote in message
    > news:...
    >> If the first page doesn't have to be a dynamic page you can always use
    >> Javascript:
    >>
    >> <head>
    >>
    >> <script language="JavaScript">
    >>
    >> window.location="http://www.yourdomain.com/yoursecondpage.asp";
    >>
    >> </script>
    >>
    >> </head>
    >>
    >> Gabriel Lozano-Morán
    >>
    >> Software Engineer
    >>
    >> Sogeti
    >>
    >>
    >> "RayAll" <> wrote in message
    >> news:...
    >>>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
    >>>

    >>
    >>

    >
    >
     
    Gabriel Lozano-Morán, Apr 18, 2005
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Simon Prince
    Replies:
    1
    Views:
    589
    Bobby Ryzhy
    Jul 14, 2004
  2. =?Utf-8?B?SklNLkgu?=

    Q: Reponse.Redirect

    =?Utf-8?B?SklNLkgu?=, Jun 23, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    634
    Kevin Spencer
    Jun 23, 2005
  3. Samuel Shulman

    Reponse.Redirect Using the POST Method

    Samuel Shulman, Nov 28, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    547
    Cowboy \(Gregory A. Beamer\)
    Nov 28, 2006
  4. Replies:
    1
    Views:
    292
    Cowboy \(Gregory A. Beamer\)
    Sep 2, 2008
  5. ethem
    Replies:
    1
    Views:
    374
    ethem
    Aug 4, 2010
Loading...

Share This Page