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. response.redirect afetr few seconds

response.redirect afetr few seconds

Scheduled Pinned Locked Moved ASP.NET
question
3 Posts 3 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
    benams
    wrote on last edited by
    #1

    I have a basic login page. when a user is logged in, I want him to be redirected to a page with a success message and after 3 seconds, I want him to be redirected to my home page. I know that I can use sleep time, but it's not recommended. So what's the best way to achieve it?

    P M 2 Replies Last reply
    0
    • B benams

      I have a basic login page. when a user is logged in, I want him to be redirected to a page with a success message and after 3 seconds, I want him to be redirected to my home page. I know that I can use sleep time, but it's not recommended. So what's the best way to achieve it?

      P Offline
      P Offline
      Parwej Ahamad
      wrote on last edited by
      #2

      I think you can implement through refresh tag under head section: You can use the META HTML tag to redirect the user. Below is an example:

      OR Try with :

      Response.AddHeader("REFRESH","10;URL=http://www.yourdomain.com");

      Parwej Ahamad ahamad.parwej@gmail.com

      1 Reply Last reply
      0
      • B benams

        I have a basic login page. when a user is logged in, I want him to be redirected to a page with a success message and after 3 seconds, I want him to be redirected to my home page. I know that I can use sleep time, but it's not recommended. So what's the best way to achieve it?

        M Offline
        M Offline
        Morgs Morgan
        wrote on last edited by
        #3

        You can use Javascript if you want:

        setTimeout( 'window.location = "default.aspx";', 3000 );

        You can excute that script from anywhere even in your codebehind. Hope that helps

        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