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. delayed action and response.redirect in same moment

delayed action and response.redirect in same moment

Scheduled Pinned Locked Moved ASP.NET
helpquestion
6 Posts 2 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.
  • L Offline
    L Offline
    laziale
    wrote on last edited by
    #1

    Hello - I need a help with this issue and I hope someone can help me. I want to have a page which will perform a delayed action, lets say, after 10 minutes execute some method, but I want the user to be redirected in the same moment when the button will be clicked, not to wait 10 minutes for the next page. Like even if the page is closed, the code to be executed after the amount of time I will declare. Is that possible? Thanks a lot for every help, Laziale

    M 1 Reply Last reply
    0
    • L laziale

      Hello - I need a help with this issue and I hope someone can help me. I want to have a page which will perform a delayed action, lets say, after 10 minutes execute some method, but I want the user to be redirected in the same moment when the button will be clicked, not to wait 10 minutes for the next page. Like even if the page is closed, the code to be executed after the amount of time I will declare. Is that possible? Thanks a lot for every help, Laziale

      M Offline
      M Offline
      m khansari
      wrote on last edited by
      #2

      Hi You can use multithread programming and Ajax(to inform work complete) Multithreading: when the server recieves the client's request , the web application delegates a secondary thread to do time consuming task and responses the client to be waiting. Ajax: the client callbacks every 10 minutes(for example) to the server to inform whether the task is completed or not Hope to be useful

      Mohammad Khansari

      L 1 Reply Last reply
      0
      • M m khansari

        Hi You can use multithread programming and Ajax(to inform work complete) Multithreading: when the server recieves the client's request , the web application delegates a secondary thread to do time consuming task and responses the client to be waiting. Ajax: the client callbacks every 10 minutes(for example) to the server to inform whether the task is completed or not Hope to be useful

        Mohammad Khansari

        L Offline
        L Offline
        laziale
        wrote on last edited by
        #3

        that will work even if a user close the page?

        M 1 Reply Last reply
        0
        • L laziale

          that will work even if a user close the page?

          M Offline
          M Offline
          m khansari
          wrote on last edited by
          #4

          hi yes ;)

          Mohammad Khansari

          L 1 Reply Last reply
          0
          • M m khansari

            hi yes ;)

            Mohammad Khansari

            L Offline
            L Offline
            laziale
            wrote on last edited by
            #5

            for some reason, once the user(in this case, me) close the page, every process stops. Can you please give me some example, chunk of code to see your idea, please. Thx in advance, Laziale

            M 1 Reply Last reply
            0
            • L laziale

              for some reason, once the user(in this case, me) close the page, every process stops. Can you please give me some example, chunk of code to see your idea, please. Thx in advance, Laziale

              M Offline
              M Offline
              m khansari
              wrote on last edited by
              #6

              hi the application pool is always run. when the process is stopped the secondary thread is working to finish it's task. when it finish it's task the result must be saved on application state or database or hard disk It is only an idea and I have not implement it yet. hope to help you another solution: you can use Ajax and a httphandler(it can be your page) without any submit and any multithreading. (I think it is better than previous approach)

              Mohammad Khansari

              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