view raw
csharper csharper - 8 months ago 57
ASP.NET (C#) Question

listbox; number of selected items

While using listbox in c#, how can learn the count of selecteditems?

Listbox items: A,B,C,D. For example, I select C and D.

I want to make a loop in order to assign selecteditems.

How can I achieve it? How can I learn the number of selected item?

Thank you


Maybe you are looking for this listbox1.GetSelectedIndices().Count();