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. How do you set a time delay for Response.Redirect()

How do you set a time delay for Response.Redirect()

Scheduled Pinned Locked Moved ASP.NET
databasecom
6 Posts 4 Posters 7 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.
  • K Offline
    K Offline
    kinsella_john
    wrote on last edited by
    #1

    I am creating a site, and wanted to instigate a basic landing page.. i thought perhaps i could use Response.Redirect to put a 5second delay on the transfer to index.aspx any suggestions would be fantastic.. John

    John Michael Kinsella kinsellajohn@hotmail.com

    K 1 Reply Last reply
    0
    • K kinsella_john

      I am creating a site, and wanted to instigate a basic landing page.. i thought perhaps i could use Response.Redirect to put a 5second delay on the transfer to index.aspx any suggestions would be fantastic.. John

      John Michael Kinsella kinsellajohn@hotmail.com

      K Offline
      K Offline
      kubben
      wrote on last edited by
      #2

      If you want to delay something you will probably need to use: System.Threading.Thread.Sleep(5000) Hope that helps. Ben

      G 1 Reply Last reply
      0
      • K kubben

        If you want to delay something you will probably need to use: System.Threading.Thread.Sleep(5000) Hope that helps. Ben

        G Offline
        G Offline
        Guffa
        wrote on last edited by
        #3

        You should try to do the delay in the browser instead of on the server. As long as the request is blocked on the server, it will not answer to any other request from the browser. The Javascript window.setTimeout method can be used to run code after a delay.

        --- single minded; short sighted; long gone;

        K K 2 Replies Last reply
        0
        • G Guffa

          You should try to do the delay in the browser instead of on the server. As long as the request is blocked on the server, it will not answer to any other request from the browser. The Javascript window.setTimeout method can be used to run code after a delay.

          --- single minded; short sighted; long gone;

          K Offline
          K Offline
          kubben
          wrote on last edited by
          #4

          That is a great point. I am not sure why you would want to delay a redirect anyway. Ben

          1 Reply Last reply
          0
          • G Guffa

            You should try to do the delay in the browser instead of on the server. As long as the request is blocked on the server, it will not answer to any other request from the browser. The Javascript window.setTimeout method can be used to run code after a delay.

            --- single minded; short sighted; long gone;

            K Offline
            K Offline
            kinsella_john
            wrote on last edited by
            #5

            Thanks for the suggestions guys.. basically i have just taken an asp.net exam and i am trying to put the skills to practical use. unfortunately i am not familiar with javascript but if you could give me more details i am more than willing to research. thanks again for your responses.. John

            John Michael Kinsella kinsellajohn@hotmail.com

            C 1 Reply Last reply
            0
            • K kinsella_john

              Thanks for the suggestions guys.. basically i have just taken an asp.net exam and i am trying to put the skills to practical use. unfortunately i am not familiar with javascript but if you could give me more details i am more than willing to research. thanks again for your responses.. John

              John Michael Kinsella kinsellajohn@hotmail.com

              C Offline
              C Offline
              Christian Graus
              wrote on last edited by
              #6

              ASP.NET is a framework which generates HTML on the server. Javascript is the language that runs in your browser, and the language in which ASP.NET generates code to do anything that runs on the client ( such as validation ). Buy a javascript book and work through it, or look up some tutorials on the web.

              Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

              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