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. differnce between

differnce between

Scheduled Pinned Locked Moved ASP.NET
sysadmin
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.
  • M Offline
    M Offline
    mnarayana3
    wrote on last edited by
    #1

    differnce between these response.redirect("login.page"); server.transfer("login.page"); asap

    _ S V 3 Replies Last reply
    0
    • M mnarayana3

      differnce between these response.redirect("login.page"); server.transfer("login.page"); asap

      _ Offline
      _ Offline
      _AK_
      wrote on last edited by
      #2

      Get it here[^]

      Apurva Kaushal

      1 Reply Last reply
      0
      • M mnarayana3

        differnce between these response.redirect("login.page"); server.transfer("login.page"); asap

        S Offline
        S Offline
        Sathesh Sakthivel
        wrote on last edited by
        #3

        Server.Transfer is often a better choice than Response.Redirect. Example:Let's say you're on A.aspx and you want to send the user to B.aspx. Response.Redirect flow A.aspx calls Response.Redirect("B.aspx",false); which sends a 302 redirect header down to the client browser, telling it that the asset it has requested (A.aspx) has moved to B.aspx, and the web application terminates. The client browser then sends a request to the webserver for B.aspx. IIS tells asp_wp.exe to process the request. asp_wp.exe (after checking authentication and doing all the other setup stuff it needs to do when a new request comes in) instantiates the appropriate class for B.aspx, processes the request, sends the result to the browser, and shuts down. Server.Transfer flow A.aspx calls Server.Transfer("B.aspx");. ASP.NET instantiates the appropriate class for B.aspx, processes the request, sends the result to the browser, and shuts down. Note that Server.Transfer cuts the load on the client and the server. Server.Transfer is easier to code for, too, since you maintain your state. Information can be passed through the HTTP Context object between the pages, eliminating the need to pass information in the querystring or reload it from the database.

        Regards, Satips.:rose:

        1 Reply Last reply
        0
        • M mnarayana3

          differnce between these response.redirect("login.page"); server.transfer("login.page"); asap

          V Offline
          V Offline
          Venk259
          wrote on last edited by
          #4

          response.redirect(""); In this method the redirection to the page is sent to the browser. From the browser it is redirected to the page. i.e Process goes like this Server -> client(browser) -> Server -> client(browser) set redirect the page Page is loaded redirect command to the browser server.transfer(""); In this method the redirection to the page is done in server, so the redirect page is sent to the browser i.e Process goes like this Server -> Server -> Client(browser) Transfer transfer Page is loaded the page page is sent Note:- So response.redirect("") does call to client and then to server for loading , server.transfer("") does not call to client, but transfer in the server and load that page to the client

          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