Click here to Skip to main content
15,887,944 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
we need to capture many data in single combobox and insert them into database on button click in c#.
Posted
Updated 16-Oct-11 23:32pm
v2

You can get the values by looping through the ComboBox Items. Once that is done you can run an update query to save to the database.

C#
foreach( ComboBoxItem item in ComboBox1.Items )
{
  string strValue = Convert.ToString(item);
  /*Implement an update query to save to the database here*/
}
 
Share this answer
 
v2
i have just answered to the same kind of question.
and here is my same answer...

i think you are very beginner in the C#.Net i suggest you to learn something about C# basic first.
though you can see here is very basic article for Insert,Update,Delete in Windows Form Application that may helps you.
 
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