Save data to database after specific interval!
-
Hi guys, I have developed a lengthy form, some time end user takes more than an hour to fill in and submit that form to database. All code is inside updatepanel and script manager control this is requirement. so end user is either filling in the form or sitting idle it doesn't make any difference. I dont want to increase session timeout. Is there anyway to fire button's submit event after 10 mins to enable the form to submit data automatically if user doesn't click the submit button. any help would be really appreciated. thanks kind regards, learner
-
Hi guys, I have developed a lengthy form, some time end user takes more than an hour to fill in and submit that form to database. All code is inside updatepanel and script manager control this is requirement. so end user is either filling in the form or sitting idle it doesn't make any difference. I dont want to increase session timeout. Is there anyway to fire button's submit event after 10 mins to enable the form to submit data automatically if user doesn't click the submit button. any help would be really appreciated. thanks kind regards, learner
From the description, it has to be one huge form to fill. I hope you have not placed entire thing into a single page. What you can do is when the user navigates from one page to another, do a partial save so that you don't loose data.
"No matter how many fish in the sea; it will be so empty without me." - From song "Without me" by Eminem
-
From the description, it has to be one huge form to fill. I hope you have not placed entire thing into a single page. What you can do is when the user navigates from one page to another, do a partial save so that you don't loose data.
"No matter how many fish in the sea; it will be so empty without me." - From song "Without me" by Eminem
thanks for your response danish, but i think i couldn't explain my problem properly. now scenario is Off course form is lenghty and everything is working absolutely fine there is no problem with insertion, updation or deletion. Now the problem is sometimes users take more time than normal that's why session got expire, my boss asked me to save data after 10 mins either end user submit or not. even all blank fields. system can save form even there is not any field filled in. Now my problem is that how I could store data after every 10 mins automatically. any suggestion would be appreciated. kind regards, learner
-
thanks for your response danish, but i think i couldn't explain my problem properly. now scenario is Off course form is lenghty and everything is working absolutely fine there is no problem with insertion, updation or deletion. Now the problem is sometimes users take more time than normal that's why session got expire, my boss asked me to save data after 10 mins either end user submit or not. even all blank fields. system can save form even there is not any field filled in. Now my problem is that how I could store data after every 10 mins automatically. any suggestion would be appreciated. kind regards, learner
Learner520 wrote:
now scenario is Off course form is lenghty
That is what you should look to get rid off. Functionality might work. But think of someone using their mobile phones (no 3G) to browse your website or someone with almost dead internet connection. I would be very frustration to wait for ages to get form loaded. Hence, I suggested to split form across the pages and you can save them when user moves from one page to another. BTW if you still need to have save happening with current structure, you would need Ajax. You can keep your submit button in an UpdatePanel and then trigger its click event regularly. You can use a Timer for this. Set its interval as 10 mins and handle Elapsed event to call Save/Submit button click. Use of UpdatePanel would help you getting rid of the page reload. Also, if you are doing save on regular basis, you will need to keep track if save is called first time or not. You should do save first and Update then after.
"No matter how many fish in the sea; it will be so empty without me." - From song "Without me" by Eminem
modified on Tuesday, February 2, 2010 9:58 AM
-
Learner520 wrote:
now scenario is Off course form is lenghty
That is what you should look to get rid off. Functionality might work. But think of someone using their mobile phones (no 3G) to browse your website or someone with almost dead internet connection. I would be very frustration to wait for ages to get form loaded. Hence, I suggested to split form across the pages and you can save them when user moves from one page to another. BTW if you still need to have save happening with current structure, you would need Ajax. You can keep your submit button in an UpdatePanel and then trigger its click event regularly. You can use a Timer for this. Set its interval as 10 mins and handle Elapsed event to call Save/Submit button click. Use of UpdatePanel would help you getting rid of the page reload. Also, if you are doing save on regular basis, you will need to keep track if save is called first time or not. You should do save first and Update then after.
"No matter how many fish in the sea; it will be so empty without me." - From song "Without me" by Eminem
modified on Tuesday, February 2, 2010 9:58 AM
thanks danish I have done in the same way as you told. kind regards learner