• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 154
  • Last Modified:

How do you select more than one answer in a drop down list box?

I have a web form that has drop down list boxes.  I have to now add the functionality that the drop down list box be able to select more then one answer at a time.  How do I do that in ASP.NET?
0
VBBRett
Asked:
VBBRett
1 Solution
 
z3r3Commented:
You use a different control like a list box.
0
 
PaulHewsCommented:
You can't use a dropdown list box for this.  If you add a regular listbox, you can change SelectionMode property to "Multiple", then you can access the selected items in code behind like this:

Dim item as WebControls.ListItem
For Each item in ListBox1.Items
    If item.Selected Then
        Message.Text &= item.Text & "<br>"
    End If
Next
0
 
VBBRettAuthor Commented:
Multiple select option for list boxes.
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now