Dropdownlist and selected value

B

Big E

I'm using ASP.Net and SQL Server 2000.
I have a dropdownlist that is populated from a table.
I also have the dropdownlist looking up another table to see if the user had
previously selected anything.
My issue is that when I try and set the selected value of the dropdown list
to the contents of the stored procedure it only highlights one of
selections. It won't highlight the whole selection. This is what I have so
far.

Thanks E
Dim i As Integer

For i = 0 To dtCom.Rows.Count - 1

lstCommunities.SelectedValue =
dsCom.Tables("tblCommQuesAnsw").Rows(0)("CommunityID")

Next
 
S

Shan Plourde

I don't think that you can do this with a drop down list, as its not
supported by the build in drop down list control to be able to drop the
list down and have multiple items chosen. You can with a listbox, where
and set the Multiple attribute. See
http://www.htmlhelp.com/reference/html40/forms/select.html, and
http://msdn.microsoft.com/library/d...webcontrolslistboxclassselectionmodetopic.asp.
Here you will see that drop down lists don't have this attribute:
http://msdn.microsoft.com/library/d...rlrfsystemwebuiwebcontrolslabelclasstopic.asp
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,239
Members
46,827
Latest member
DMUK_Beginner

Latest Threads

Top