Windows listbox vs. asp.net dropdown list etc.

S

Sandy

I am used to asp.net where dropdown listboxes etc. contain 'items'
which I
can easily loop through.

I am trying to figure out how Windows form list boxes (etc.) work.

For example: Can I (like in the web) have a listbox which displays the
value
'John Smith' but when I get the selected value returns '1285' ?
(representing the id for John Smith)

Also I have a dropdownlist box from which the user can select
multiple
items, how do I access those items?

Currently I have:

If lbRuleSet.SelectedItems.Count > 0 Then

and this works. It can tell if there is more than 0 items selected.
How can
I loop through them and get the values? I found some code on the net
but it
didn't work.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top