[thelist] RE: Auto-Selecting Multiple Select with ASP 2.0?

Rob Smith rob.smith at THERMON.com
Thu Oct 23 12:35:26 CDT 2003

Ok. I figured it out. the correct line down there should be:

People.fields.item("userName").value = trim(members(x))

Thanks anyway,


-----Original Message-----
From: Rob Smith 
Sent: Thursday, October 23, 2003 12:16 PM
To: Thelist (E-mail)
Subject: Auto-Selecting Multiple Select with ASP 2.0?

Hi list,

here's my data in question:
(MyProject.fields.item("Members").value) has this as a string:
DMC\jdoe, DMC\janedoe, DMC\barney

here's my loop to auto select those accounts with a multiple select

<select name="members" size="5" multiple>
    members = split(MyProject.fields.item("Members").value,",")
    count_members = uBound(members)
    while not People.eof
      response.write("<option value=""" &
People.fields.item("userName").value & """")
      for x = 0 to count_members 
        if People.fields.item("userName").value = members(x) then
          response.write (" Selected")
        end if
      response.write(">" & People.fields.item("FirstName").value & " " &
People.fields.item("LastName").value & "</option>")

This works great, but only selects the first name in the series. It
completely ignores: DMC\janedoe, DMC\barney.

Anyone have any idea as to why?


More information about the thelist mailing list