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. Technicalities: response.Redirect and Server.Transfer

Technicalities: response.Redirect and Server.Transfer

Scheduled Pinned Locked Moved ASP.NET
questionsysadminhelp
4 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.
  • D Offline
    D Offline
    DotNet_Newbie
    wrote on last edited by
    #1

    Hello all Gurus, I have a quick question: can you please shed some light on the deference’s between using Response.Redirect and Server.Transfer I understand that one runs at the client and the other terminates the current page and starts executing the new page on the server. Can you please provide some more explanation of what is going in exactly, and when it is preferred top use each one of them. Thank you very much in advance for all your help.

    R T 2 Replies Last reply
    0
    • D DotNet_Newbie

      Hello all Gurus, I have a quick question: can you please shed some light on the deference’s between using Response.Redirect and Server.Transfer I understand that one runs at the client and the other terminates the current page and starts executing the new page on the server. Can you please provide some more explanation of what is going in exactly, and when it is preferred top use each one of them. Thank you very much in advance for all your help.

      R Offline
      R Offline
      Rocky Moore
      wrote on last edited by
      #2

      DotNet WebDev Newbe wrote: can you please shed some light on the deference’s between using Response.Redirect and Server.Transfer The redirect will actually force send a response to the browse and tell it to navigate to another page. The transfer will internally transfer to another page on the server without sending anything back to the client. This means to the client, it does not know that it is not using the page requested since the transfer was internal to the server. The later makes the process faster and is the perferred method for transferring to a page on the same server. Rocky Moore <><

      X 1 Reply Last reply
      0
      • D DotNet_Newbie

        Hello all Gurus, I have a quick question: can you please shed some light on the deference’s between using Response.Redirect and Server.Transfer I understand that one runs at the client and the other terminates the current page and starts executing the new page on the server. Can you please provide some more explanation of what is going in exactly, and when it is preferred top use each one of them. Thank you very much in advance for all your help.

        T Offline
        T Offline
        Thoths
        wrote on last edited by
        #3

        Adding to previous reply by Rocky moore one more advantage in server.transfer in .net is that u can retrieve posted form values in the transferred page.. just u need to give the second parameter to the transfer method as true.. server.transfer("somepage.aspx",true) so by this the form values can be transferred to another page.. Cheers Thotatri P, Sr.Software Engineer Scape Velocity Net solutions Ltd. Chennai

        1 Reply Last reply
        0
        • R Rocky Moore

          DotNet WebDev Newbe wrote: can you please shed some light on the deference’s between using Response.Redirect and Server.Transfer The redirect will actually force send a response to the browse and tell it to navigate to another page. The transfer will internally transfer to another page on the server without sending anything back to the client. This means to the client, it does not know that it is not using the page requested since the transfer was internal to the server. The later makes the process faster and is the perferred method for transferring to a page on the same server. Rocky Moore <><

          X Offline
          X Offline
          Xiangyang Liu
          wrote on last edited by
          #4

          Rocky Moore wrote: The later makes the process faster and is the perferred method for transferring to a page on the same server. Just want to add: 1. Server.Transfer doesn't seem to work between virtual directories on the same server. For example, you cannot transfer to a page on a different virtual directory, even if it is located on the same website. 2. You cannot use Server.Transfer with non .NET pages (.asp pages, for example). Click here to see my articles and software tools

          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