Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx thread: asp:listbox and multiple selection


Message #1 by "Ashley Pace" <apace@l...> on Mon, 24 Sep 2001 16:42:46
Has anyone had a problem with looping through all the items in the listbox 

and determining if each one is selected?  I've found the code to do this, 

but when I select multiple items and submit the page, it's only saying 

that one was selected.  I did set the selectionmode to multiple and it's 

passing that I selected more that one item if I look at the form values 

that are passed.  Can anyone help?
Message #2 by "Chris Scott" <chris@e...> on Fri, 28 Sep 2001 09:47:50 -0700
Hi Ashley,



You could loop through the Items collection of the listbox, checking the

.Selected property for each (if selected, grab the .Value).



Chris



----- Original Message -----

From: "Ashley Pace" <apace@l...>

To: "ASP+" <aspx@p...>

Sent: Monday, September 24, 2001 4:42 PM

Subject: [aspx] asp:listbox and multiple selection





> Has anyone had a problem with looping through all the items in the listbox

> and determining if each one is selected?  I've found the code to do this,

> but when I select multiple items and submit the page, it's only saying

> that one was selected.  I did set the selectionmode to multiple and it's

> passing that I selected more that one item if I look at the form values

> that are passed.  Can anyone help?

>




>

>




  Return to Index