Click here to Skip to main content
15,949,741 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more: (untagged)
when entered data in textboxes and comboboxes in wpf windows once i click add or save button , again the same windows should display the last entered data , How it is possible in wpf unsig C#

What I have tried:

when entered data in textboxes and comboboxes in wpf windows once i click add or save button , again the same windows should display the last entered data , How it is possible in wpf unsig C# 
Posted
Updated 22-Oct-20 21:49pm

1 solution

Basically, that's up to you, and the resources you have available to you.
There are a lot of ways to do this - it's called persistent data by the way - ranging from application config files right up to databases, and we have no idea what is available to you and what isn't.

If you are trying to save just one set of data and discard all previous ones, then look at Store custom information from a configuration file - C# | Microsoft Docs[^]
If you want to save more than one data set, then you can use config files (but it's much, much more complicated and unwieldy) but you also have a huge range of other possibilities: text files, CSV, XML, JSON, and a number of databases such as SQL Server, MySQL, qLite, Access, and Oracle are the obvious ones, but which is right for you, we can't tell.

Stop where you are, think about exactly what you want to store and for how long, then google some of the "names" above and work out what you need to store and how much of it before you start to move on to implementation.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900