csharper csharper - 1 year ago 112
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

Answer Source

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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download