473,385 Members | 1,830 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Build an autosave function on page?

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


Aug 30 '06 #1
2 2308
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)

"Groove" <no***@noemail.comwrote in message
news:uC**************@TK2MSFTNGP03.phx.gbl...
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


Aug 30 '06 #2
use AJAX to save the form to the server on a timer

see GMail for an example

neil

Groove wrote:
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
Aug 30 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: p-nut | last post by:
newbie here needing some help. Is there a way to set up a script that will check a pop3 account and autosave the file attachments to a folder specified? The thing is: I have 1 single email...
11
by: ajikoe | last post by:
Hello, I used Visual C# Standard Edition. I want to comment my program using xml commentary method, I don't know why if I use value and example tag, it is not working / showed in the html...
7
by: jaYPee | last post by:
I am using dataset as a datasource for my datagrid. I'm wondering how to program to autosave the changes made in a datagrid just like microsoft access. any help is greatly appreciated.
3
by: John Wright | last post by:
I want to create an autosave and crash recovery module for my program. I imagine I would have to use a timer control on the form to call the autosave functionality but I need a starting point. I...
1
by: prinsipe | last post by:
hi all, how can i autosave edited values from my datagrid when the user moves from page to page? i am using template column, textbox is used in item for the user to update the values. is...
2
by: yuvang | last post by:
I have one MDB which is located in server and so many persons are accessing and adding data to that mdb. Here is my doubt 1. is ms access has autosave option? 2. If yes, in what time interval it...
0
by: Akira Kitada | last post by:
Hi list, I was trying to build Python 2.6 on FreeBSD 4.11 and found it failed to build some of the modules. """ Failed to find the necessary bits to build these modules: _bsddb ...
0
by: M.-A. Lemburg | last post by:
On 2008-10-25 08:39, Akira Kitada wrote: Please post a bug report on python.org about these failures. The multiprocessing module is still fairly new and obviously needs more fine tuning for...
0
by: Akira Kitada | last post by:
Hi Marc-Andre, Thanks for the suggestion. I opened a ticket for this issue: http://bugs.python.org/issue4204 Now I understand the state of the multiprocessing module, but it's too bad to see...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.