Clinton
Clinton

Reputation: 1

How to save user inputed data c# winforms

I wanted to know how to save user inputed data. Like when they type in a text box or check a checkbox and close the application the next time they start it up again, that data that they inputed is there like saved. this is in c# VS2010 .NET 4.0

Upvotes: 0

Views: 8457

Answers (2)

Bibhu
Bibhu

Reputation: 4081

You can save the user input into the any database or in app.config or in xml files, so that the next file you start the application you can read the values from there.

Upvotes: 0

TheRealTy
TheRealTy

Reputation: 2429

In the project settings you can add settings, then add an event lister for the FormClosing event.

In that you can put

MyProject.Properties.Settings.Default.MySetting = MyTxtBox.Text;
MyProject.Properties.Settings.Default.MySetting.Save();

Upvotes: 1

Related Questions