473,883 Members | 1,679 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3688
"kurt" <kb****@granite microsystems.co m> wrote in
news:11******** **************@ f14g2000cwb.goo glegroups.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********@rog ers.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****@granite microsystems.co m> wrote in
news:11******** **************@ g14g2000cwa.goo glegroups.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_javasc ript.php3

--
Lucas Tam (RE********@rog ers.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****@granite microsystems.co m> wrote in
news:11******** **************@ g14g2000cwa.goo glegroups.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********@rog ers.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
1887
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 dumb mistake STORED PROCEDURE CREATE Procedure OrdersAddDetail ( @fname nvarchar(50), @lnametxt nvarchar(50), @add1 nvarchar(50), @add2 nvarchar(50),
2
15742
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 generates a custom auto-number (yyyy-0000) when a New Record button is clicked. The code checks the table for the highest value and then assigns 1 and inserts the value. I have a second text box which needs the same type of custom auto-number which has to be generated from a second command button. ...
13
7679
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 void DataGrid1_UpdateCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e) TextBox temp temp=(TextBox)e.Item.Cells.Controls String str=temp.Text; str always returnt the old value of the cell (before being updated) would u plz tell me about whats wrong i m doin
5
1878
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 a look at my code and see what am I doing wrong. I had to set the datagrid's DataKeyField to MailSubscriberID manually since vs does not do it automatically. Thanks
2
19887
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. Thanks in advance. Mamatha
1
2030
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 provided in the database. when i ran through da browsers and click update it gave me this error: Specified argument was out of the range of valid values. Parameter name:
5
3595
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 is to provide a series of dynamic text boxes. The combination of these selections will power the update of this last "Form_BB_Value" textbox. I'm building an Access 2000 db in Access 2003. Private Sub System_AfterUpdate() On Error Resume Next Form_BB_Value = "Select tblCRX.BB_Value...
0
929
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 particular moment. i have a dropdownlist which has two options check and cash. when i select check another textbox opens for check no. so when i am updating when the value is check in dropdownlist and check no in the textbox it updates in second attempt. it works fine when it is cash and dont...
2
2646
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, update some fields and hit the update button to update the information which is stored in a SQL database. In testing we noticed that the form was updating correctly but the update mechanism was also updating the first record of the table in the sql database every time. No error messages are on...
4
2920
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 the field on the form. It works fine when the field is not a null value. I am not using any code behind (C#) to bind the data or manipulate the data. I have read that when there is a null value in the database that there is no record in the "dataset". Can anyone show me how to bind a value in the...
0
9787
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10838
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9568
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7964
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7119
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5794
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4607
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4212
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3230
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.