delayed action and response.redirect in same moment
-
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
-
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
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
-
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
-
hi yes ;)
Mohammad Khansari
-
hi yes ;)
Mohammad Khansari
-
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
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