Click here to Skip to main content
12,956,234 members (62,735 online)
Rate this:
Please Sign up or sign in to vote.
How to get the selected value of a list box that has multiple selection enabled. Just the selected items need to get their values.
Posted 8-Mar-12 7:30am
Updated 11-May-12 10:18am
SAKryukov 8-Mar-12 13:46pm
What is "ListBob"?
Member 8317792 8-Mar-12 14:00pm
List Box **
SAKryukov 8-Mar-12 18:40pm
Hm. Did you notice "Improve question" above?
Member 8317792 11-May-12 16:17pm
I do now :)
Rate this: bad
Please Sign up or sign in to vote.

Solution 3

Dude... I also came through certain situation.
But the only change in my case is, it was checklistbox.

If I am not wrong, you must facing problem like,

On selection of list value you need the current selectedvalue,
but you must be getting the first selected value on every selection change...

If this is your problem, I have made a solution for checklistbox on my blog
You can refer the same, only by changing my checklistbox to listbox
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

The ASP.NET class System.Web.UI.WebControls.ListBox does not support multiple selection in the same way as in WPF or System.Windows.Forms.

Please see:[^]

For multi-select mode, please see:[^].

Locate the section "Examples" and look for the first example. It shows how to work with multiple selection


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month
OriginalGriff 6,869
CHill60 3,550
Maciej Los 3,302
ppolymorphe 2,080
Jochen Arndt 1,973

Advertise | Privacy | Mobile
Web01 | 2.8.170525.1 | Last Updated 11 May 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100