472,353 Members | 1,486 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

Update textbox value for auto-save

Hi all,

I have something that has me stumped. I have a webform that has several
text boxes. Each of these boxes has the textchanged set so when the
user enters text and leaves the textbox, it runs through and updates
the table with the changed text....which is fine.

But, these users do enter a substantial amount of information in these
textboxes and at times get sidetracked. Sometimes, they come back later
to see the session expired and they can no longer save the information
they entered in the textbox (in this case, they stayed in the same
textbox and textchanged didn't happen). I don't want to keep the
sessions running for a rediculous amount of time for a variety of
reasons, so it does timeout within a reasonable period.

What I would like to do is a type of 'autosave' where it gets sent to
the sub that saves the text and updates the table.

However, when when I try to send it to the Save sub and update through
code...like say from a timer a minute before the session expiration,
the value of the textboxes do not contain any added or changed text. If
I check the value of Text1.text, it will contain 'pre-changed' text.
But, if the user was to click a Save button, the actual text that is
showing in the textbox will be saved. So that way it actually grabs the
current text in the textbox.

Is there a way to update text1.text (or any textbox) to what actually
is entered in the textbox so it can be autosaved? I don't think there
would be a problem in a Windows form, but I'm not using that. I've
tried several things like trying to send it back through Page_Load and
the like, but it's still being stubborn. Is this possible? Thanks for
any help!!!
Kurt

Nov 19 '05 #1
6 3527
"kurt" <kb****@granitemicrosystems.com> wrote in
news:11**********************@f14g2000cwb.googlegr oups.com:
What I would like to do is a type of 'autosave' where it gets sent to
the sub that saves the text and updates the table.


In ASP.NET 2.0 you could use client-side postbacks for this. For ASP.NET
1.1, you can use Dart's live controls or AshleyIT's Javascript Remoting.

Here's a .NET implementation of AshleyIT's Javascript remoting:

http://www.thycotic.com/dotnet_remotescripting.html

Basically what you do is set a Javascript timer on the client side to
postback information in the background to save. The page will not reload
and the user will not know that the information has been saved - totally
seemless autosave : )
--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 19 '05 #2
Thanks very much for your reply Lucas.

When you mentioned using a JavaScript timer to postback information, do
you have any ideas on one? I've been doing some searching and can't
find anything that looks to do what I need. Thanks again!

Kurt

Nov 19 '05 #3
"kurt" <kb****@granitemicrosystems.com> wrote in
news:11**********************@g14g2000cwa.googlegr oups.com:
When you mentioned using a JavaScript timer to postback information, do
you have any ideas on one? I've been doing some searching and can't
find anything that looks to do what I need. Thanks again!


Take a look at Javascript's setInterval():

http://msdn.microsoft.com/library/default.asp?
url=/workshop/author/dhtml/reference/methods/setinterval.asp

Here is a clock example:

http://www.webdevelopersnotes.com/ti...time_a_simple_
clock_in_javascript.php3

--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 19 '05 #4
Lucas,
Thanks a lot for your help. I used a JavaScript timer and the
__doPostBack and it worked great!!
Kurt

Nov 19 '05 #5
"kurt" <kb****@granitemicrosystems.com> wrote in
news:11**********************@g14g2000cwa.googlegr oups.com:
Lucas,
Thanks a lot for your help. I used a JavaScript timer and the
__doPostBack and it worked great!!

I guess that would work too :) Might catch your users a bit off guard, but
better than not saving.
--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 19 '05 #6
Yeh, but I'd rather them see something happen than have them wander off
or take a phone call and come back to an expired session after entering
a lot of information. It's happened several times and these folks
aren't the happiest of campers. So yeh, you're right....it's better
than not having it saved! Thanks again Lucas!

Kurt

Nov 19 '05 #7

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

Similar topics

2
by: Sporke13 | last post by:
I have used stored procedures to insert and select but for some reason I can not get this code to update records. Please help I must have made a...
2
by: dskillingstad | last post by:
I'm trying to assign a custom value to a textbox. Here's what I have. I've created a module and "default value" code for a textbox which...
13
by: abdoly | last post by:
i wrote a code to update datagrid with the datagrid updatecommand but i cant get the updated values after being update that is the code private...
5
by: Hennie | last post by:
When trying to update a record in an editable datagrid I ran into a few problems. My update procedure is just not working. Can someone please have...
2
by: Mamatha | last post by:
Hi I want to add an icon to the textbox's text. I don't know how to display icon in textbox in VB.NET. If any one knows please let me know....
1
by: mursyidatun ismail | last post by:
Dear all, database use: Ms Access. platform: .Net i'm trying to update a record/records in a table called t_doctors by clicking da edit link...
5
cbucks
by: cbucks | last post by:
I would really appreciate help with this one. The string of code below fires with the afterupdate function of a 3rd combo box slelction. The idea...
0
by: kunalkadam248 | last post by:
in the data grid i enabled auto editing. but while updating it does not update in the first attempt but at the second. and that to happens at...
2
by: sirdavethebrave | last post by:
Hi guys - I have written a form, and a stored procedure to update the said form. It really is as simple as that. A user can go into the form,...
4
by: justice750 | last post by:
Hi All, I am using a FormView control. The allows me to update records in the database. However, when a database field is null I can not update...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
0
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand....
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python...

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.