First of all im using C# with two forms. Form1 is for combobox and Form2 is for textbox.
And im using .txt file as my database.
here how my database look alike:-
name, test1, test2, test3, test4
John, 1 , 1 , 0 , 1
Dune, 1 , 0 , 0 , 1
Petr, 1 , 1 , 1 , 1
Sam, 0 , 1 , 0 , 1
So i want my combobox shows the name only. when i choose one of the name and press ok button it will jump to Form2 textbox.
Now the value for test1, test2, test3 and test4 from database will be written in textbox1, textbox2, textbox3 and textbox 4 respectively.
How can I do that?
The format you’re describing for your text file is a CSV – Comma Separated Value. It’s a very common storage format, and there are many helpful tools and examples out there to work with it.
So now that you know how it’s called, you can run more specific searches for things like “CSV C#” and “how to read CSV in C#” and find good answers on how to do what you need.