Click here to Skip to main content
15,867,771 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have two list box as follows;

List box1 and list box2.

when i select list box1 selected items it goes to list box2.

that coding is working fine no problem.

But i want List box2 selected items to be saved in the data base.

how can i do.

please help me.

Ouput i want as follows;

List box1 list box2.
Ram sam
sam Suresh
Raju
Suresh

i want to listbox2 selected ites(sam and Suresh) to be save in the data base.when i click the save button that sam and suresh to be save in the data base.


how can i do.

please help me.
Posted
Comments
_Maxxx_ 30-Jan-13 0:38am    
You haven't given enough information for anyone to help very much with this - and you describe your required output but are asking bout writing to the database - you need to provide much more information, I think, in order for anyone to know what you need help with.
[no name] 30-Jan-13 0:40am    
can u post schema of the database tat u r goin to use..
[no name] 30-Jan-13 0:42am    
can u post schema of the database table tat u r goin to use?

1 solution

It would be easier if you could define which part you needed help with (selecting list box items or saving them to the database).

However, here are some links that might be of assistance to you -
http://www.c-sharpcorner.com/blogs/8236/insert-all-the-selected-items-from-the-listbox-to-a-database.aspx[^]
Inserting data from listbox into database in C#[^]
http://www.java2s.com/Tutorial/CSharp/0560__ADO.Net/ReaddatafromdatabasetableaddittoaListBox.htm[^]
 
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