Hello All,
I have been stumped for a couple days on something. Working in Visual Studio 2005 C#, I have a list box(Multiple Selection) that is generated from from a SQL2005 Datasource. I want to select multiple entries from the list box and pass them or it(@Name) to a stored procedure that in turn passes back to a Data Grid.
Everything is working fine except that it only grabs the top selection from the list box.
Can someone help me out or point me in the right direction for this?
Thanks,
Matt
Loading
Jan MontanoPosted Jul 31, 2007, 10:54 PM
What Property did you use in getting the selected text from the listbox? If you used Text, it will return the top selected item alright. You could use SelectedItems property to get the selected items in a listbox.
foreach (string value in listBox1.SelectedItems)
{
}