Click here to Skip to main content
15,895,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have a listbox i bound it from database using datatable.I want to retrive the SelectedItems in a listbox.
Posted
Updated 27-Sep-10 3:01am
v6
Comments
Abhijit Jana 27-Sep-10 1:34am    
Your question is not clear. You want to retrieve the value from Listbox ? Or you want to bind DataTable data to Listbox ? Could you please explain ?
vasumagadi 27-Sep-10 7:22am    
Hi,

Can you please let me know whether you are trying to make the datatable using the listbox values?

Thanks,

Vasanth
Hiren solanki 27-Sep-10 9:02am    
Edited for grammer mistake.

Probably Using.

C#
listbox.SelectedItems;


Please vote and Accept Answer if it Helped.
 
Share this answer
 
Something like this..
foreach (ListItem Litem in lbxTime.Items)
{
    if (Litem.Selected == true)
    {
        // your code..
    }
}
 
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