public string GetItemFromList(ListBox LstBox)
{
string Lst = "";
if (LstBox.SelectedIndex > -1)
{
// Iterate through the Items collection of the ListBox and
// display the selected items.
foreach (ListItem item in LstBox.Items)
{
if (item.Selected)
{
Lst += item.Text + ",";
}
}
Lst = Lst.Substring(0, Lst.Length - 1);
}
return Lst;
}