Click here to Skip to main content
15,879,613 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
C#
formes.DB.TBL_SPECIALIST p = new formes.DB.TBL_SPECIALIST();
p.SPECIALIST_DATE = DateTime.Now;
p.SPECIALIST_NAME = edt_name.Text;
p.SPECIALIST_BIRTHDATE = edt_brith_date.Value;
p.SPECIALIST_AGE_NOW = edt_age.Text;
p.SPECIALIST_EDUCATION = edt_education.Text;
p.SPECIALIST_ID_NUMBER = edt_id_num.Text;
p.SPECIALIST_PHONE = edt_phone.Text;
p.SPECIALIST_ADDRESS = edt_address.Text;
p.SPECIALIST_ACTIVE = edt_active.Text;
//listbox
p.SPECIALIST_WORKED_BEFORE = lbx_work_history.


What I have tried:

Hello i have this code and i have listbox with many items inside
how i add these items to the column
Posted
Updated 12-Feb-24 15:44pm
v2

1 solution

Why are you using the ListBox as a source of data to put in the database?

The ListBox is a UI control used to show a certain part of your data model. It should NOT be used to store the data model.

The source of items to store in the database should be your data model, not the ListBox.
UI Controls  <----->  Data Model  <----->  Database
 
Share this answer
 
v2

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