473,657 Members | 2,896 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Save user entered data

I have a Win app in C#. I want to save the data the user enterere into
textboxes and the selections the user made to comboboxes when the user close
the app. So next time when the user launches the app, he can see the data he
entered before.

How can I do this?

Thanks.
Aug 2 '06 #1
2 2126

"John" <Jo**@discussio ns.microsoft.co mwrote in message
news:8B******** *************** ***********@mic rosoft.com...
>I have a Win app in C#. I want to save the data the user enterere into
textboxes and the selections the user made to comboboxes when the user
close
the app. So next time when the user launches the app, he can see the data
he
entered before.

How can I do this?
Write them to a file, and read the file and put the data back in the boxes
(or set SelectedItem to match was was saved) next time.
Aug 2 '06 #2
An easy way is to take advantage of the auto-generated Settings class
(under Properties in your project folder). Double-click it to define a
few settings of User scope for your controls and you'll be able to
access these settings in code using strongly typed properties on the
Settings class. Make sure to call the Save method on the Settings class
before you app exits to save the settings. Next time you launch the
app, the settings will be automatically loaded.

You can also access the ApplicationSett ings property on both TextBox
and ComboBox to edit the same settings as mentioned above. You can
easily tie settings up with specific properties on the controls using
the second approach.

John wrote:
I have a Win app in C#. I want to save the data the user enterere into
textboxes and the selections the user made to comboboxes when the user close
the app. So next time when the user launches the app, he can see the data he
entered before.

How can I do this?

Thanks.
Aug 3 '06 #3

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

Similar topics

3
1840
by: Stuart E. Wugalter | last post by:
Hello All! I have a button on a form that is tied to the following query: UPDATE tblSEQTAQ AS A SET A.taqcall = WHERE (((A.taqcall)="Allele 1")); The user looks at the form and decides to assign a code for the text Allele 1. It works fine.
2
7974
by: Paul Brady | last post by:
I have non-computer skilled users entering data into a form. There are certain ranges of values which, if they enter them, make no sense in the application, but I can't test them until they try to close out the form, in which case I can look at the entire set of values and see if they're OK. So, I have this code. for the "Before Update" event: if (their variables are inappropriate) then msgbox "You've entered bad variables (or some...
7
6151
by: Javaman59 | last post by:
This is about finding the right point at which to save user entered data in the registry, so that when the application is restarted, the saved values will be restored. I want this behaviour to be automatic - ie, it happens every time, without the user pressing "OK", or "Save", whaterver.. With a Form, it is easy. Add an event handler for the Closed event, for saving, and the Load event, for restoring. A UserControl is more difficult....
0
2967
by: Dune | last post by:
Hi there, I have an aspx page that allows users to enter several parameters using drop downs and text boxes. The users then press a button that produces an extract based on the parameters they entered. When this button is pressed and extract is prduced and IE's standard Open/Save dialog should popup so they can navigate to the directory to save the extract in, or if they want, they can choose to open and view the extract without saving it. ...
4
1914
by: louise raisbeck | last post by:
I have this scenario (simplified) function addnewdata () { check for partial match already in db for information entered by user if (partialmatch succeeds) { open new window aspx page (using javascript) with a datagrid of these partial match records (by doing a sqlcommand using some query string values taken from opener data entered) *** }
4
2571
by: Matt | last post by:
Hi, I would like to save a file locally (on the client computer) in an ASP.net application. It is like the server would return some data that the user can save to a file on his local PC. The ASP page has a text field to type in the file path directly and a "Browse..." button, that shall display a "Save as..." dialog. I tried with the FileUpload control, but this does not work, since I do not want to upload an existing file, but I want to...
6
5061
MitchR
by: MitchR | last post by:
I Have created a table for data entry. The table and accompanying form used to enter data is used for returning leased assets back to a lease holder. My question is this: I want to script a Save and Clear Button on my data entry form to write the data back to the table so that I can run reports against the table & clear the form for the next item to be entered. I do not want the data to be visible to the user once the button is pressed. Here is...
4
4650
by: sufian | last post by:
Below is the field where user enters his/her email address and the AJAX post request is sent to the server and the user sees the message: echo("<div id=\"message\" class=\"success\">Thank you! You have been successfully registered.</div>"); within 1.5 seconds. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta...
8
5074
jmoudy77
by: jmoudy77 | last post by:
Hi, I've got a form that allows a user to imput their flight data. I programmed a MsgBox into the save button that asks if the user wants to input another duty position for the flight. If no, the record saves and the formresets for the next rocord input. If yes, the record is saved and the duty position and mode of flight fields are set to null, with the remainder of the fields retaining the data already entered. The problem is that...
0
8384
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8302
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,...
0
8601
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7314
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
6162
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
5630
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
4300
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
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
1601
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.