Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Difference betwen server.transfer and response.redirect

Difference betwen server.transfer and response.redirect

Scheduled Pinned Locked Moved ASP.NET
sysadmin
8 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    BalasubramanianK
    wrote on last edited by
    #1

    Anybody can tellme the difference between server.transfer and Response.redirect. Tnx in adv.

    Balasubramanian K.

    M N L 3 Replies Last reply
    0
    • B BalasubramanianK

      Anybody can tellme the difference between server.transfer and Response.redirect. Tnx in adv.

      Balasubramanian K.

      M Offline
      M Offline
      Manas Bhardwaj
      wrote on last edited by
      #2

      Response.redirect provides a roundtrip to the server and server.transfer does not. For details search microsoft IIS help Also Response.redirect redirects both the html page as well as the aspx page where as the server.transfer transfers the control only to the aspx pages

      Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.

      B 1 Reply Last reply
      0
      • B BalasubramanianK

        Anybody can tellme the difference between server.transfer and Response.redirect. Tnx in adv.

        Balasubramanian K.

        N Offline
        N Offline
        ncsubbu
        wrote on last edited by
        #3

        server.transfer is used to transfer one page to anotherpage within the website. response.redirect is used transfer one page to another page within the website as other websites.in response redirect we can pass the querystring.

        your's subbu

        B 1 Reply Last reply
        0
        • M Manas Bhardwaj

          Response.redirect provides a roundtrip to the server and server.transfer does not. For details search microsoft IIS help Also Response.redirect redirects both the html page as well as the aspx page where as the server.transfer transfers the control only to the aspx pages

          Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.

          B Offline
          B Offline
          BalasubramanianK
          wrote on last edited by
          #4

          Thanks for your reply

          Balasubramanian K.

          1 Reply Last reply
          0
          • N ncsubbu

            server.transfer is used to transfer one page to anotherpage within the website. response.redirect is used transfer one page to another page within the website as other websites.in response redirect we can pass the querystring.

            your's subbu

            B Offline
            B Offline
            BalasubramanianK
            wrote on last edited by
            #5

            can u give me any sample code for redirecting to other website by using response.redirect?

            Balasubramanian K.

            L 1 Reply Last reply
            0
            • B BalasubramanianK

              Anybody can tellme the difference between server.transfer and Response.redirect. Tnx in adv.

              Balasubramanian K.

              L Offline
              L Offline
              Learning IT
              wrote on last edited by
              #6

              server.execute stops the execution of the current page and transfers the control to the URL passed in as a parameter. After that page has finished execution control passes back to the original page and execution resumes at the statement after the execute method call. server.transfer is similar to server.execute but unlike that methos the execution does not resume to the original page but end when the new page completes executing response.redirect transfers the control to the given url but there is server round trip. In response.redirect the new url can be seen , but in server.execute and transfer the new page url is not seen even though the control is passed to the new page. Performance is better in server.execute and transfer nut they cannot be used with server-side include #exec directive.

              Maniiiiiiiiiiiiiii

              B 1 Reply Last reply
              0
              • B BalasubramanianK

                can u give me any sample code for redirecting to other website by using response.redirect?

                Balasubramanian K.

                L Offline
                L Offline
                Learning IT
                wrote on last edited by
                #7

                Response.Redirect("~/Default.aspx");

                Maniiiiiiiiiiiiiii

                1 Reply Last reply
                0
                • L Learning IT

                  server.execute stops the execution of the current page and transfers the control to the URL passed in as a parameter. After that page has finished execution control passes back to the original page and execution resumes at the statement after the execute method call. server.transfer is similar to server.execute but unlike that methos the execution does not resume to the original page but end when the new page completes executing response.redirect transfers the control to the given url but there is server round trip. In response.redirect the new url can be seen , but in server.execute and transfer the new page url is not seen even though the control is passed to the new page. Performance is better in server.execute and transfer nut they cannot be used with server-side include #exec directive.

                  Maniiiiiiiiiiiiiii

                  B Offline
                  B Offline
                  BalasubramanianK
                  wrote on last edited by
                  #8

                  Yah... thank you for your information

                  Balasubramanian K.

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups