Link to home
Create AccountLog in
Avatar of Murray Brown
Murray BrownFlag for United Kingdom of Great Britain and Northern Ireland

asked on

ASP.net ListBox with check boxes

Hi

In ASP.net 4 is there a ListBox control that contains check boxes within it?
How would I gather which items have been checked using VB.net.
I'd like to gather bith the index and the accompanying label
Avatar of John Claes
John Claes
Flag of Belgium image

as Far as I remember the ListBox has a property Items.
Herein you'll find all Checkboxes.

You can loop through them by indexCounter
if checked ==> you have the index and the checkbox (so also the lable)

Regards
Poor Beggar
ASKER CERTIFIED SOLUTION
Avatar of mr_nadger
mr_nadger
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
oh, if you're going to remove items from the list programmatically, iterate backwards through the list to avoid index out of range errors
Avatar of Murray Brown

ASKER

thanks very much