Build an autosave function on page?

G

Groove

Hey guys -

I've used the Thread.Sleep(xyz) method before to trigger a pause in a sub or
function. I was wondering if anyone knew of a method to have a page
autosave itself after X minutes?

Here's the situation. I have a form with a lot of multi-line textboxes in a
site with the user is required to be logged into. The log in info is stored
in a session variable. Even though I can increase the session timeout value
on the server to go beyond the default 20 minutes, it's still possible for
the user to take "too long" in completing this form and the sessions will
expire. When they try to save the form after taking way too long, they will
be kicked out and sent back to the log in form. So they lose everything
they spent the last X minutes/hours typing in the form.

Just as a precaution and only to be used in rare cases, I thought an "auto
save" sub routine might do the trick. Perhaps have the form save itself
after 60 minutes to prevent this. Has anyone ever done anything like this
and could someone make any suggestions?

Thanks!

-Shane

asp/vb.net 2
 
B

bruce barker \(sqlwork.com\)

the same logic works. you just have to do it with client script using
window.setTimeout. your client script should post to a hidden frame for the
save, so there would be no rerender, that would mess up the users input.

-- bruce (sqlwork.com)
 
N

neilmcguigan

use AJAX to save the form to the server on a timer

see GMail for an example

neil
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top