Burman@cool blog's(ASP.NET,SQL SERVER,JavaScript,XML,sharepoint,WCF,SSIS)
Thursday, November 1, 2012
How to get selected items value from listbox in c#
if (ListBox1.Items.Count > 0)
{
for (int i = 0; i < ListBox1.Items.Count; i++)
{
if (ListBox1.Items[i].Selected)
{
string selectedItem = ListBox1.Items[i].Text;
//insert command
}
}
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment