Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx thread: Re: asp:listbox and multiple selection


Message #1 by "Andrew Gosa" <agosa@b...> on Tue, 28 May 2002 16:58:44
> Chris--
> 
> Thanks for the note, but I've tried that and it doesn't seem to work. It 
> will only tell me that one item has been selected even if more have. 
It's 
> really driving me crazy!
> 
> > 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?

You have probably solved this by now. The way I found is through a LEFT 
OUTER JOIN and moving through the recordset that way. It works fine for 
one user, but not for several. Did you ever find another way?

  Return to Index