Build an autosave function on page?

  • Thread starter Thread starter Groove
  • Start date Start date
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
 
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)
 
Back
Top