I am tring to the usernames in the users container to a
drop down list. If I use Response.Write(result.Properties
("CN")(0) & "<Br>"), I can see the usernames, but I can't
figure out how to bind the list to a drop down. Any help
is appreciated!
Dim entry As New DirectoryEntry
("LDAP://internal.bwater.com/CN=Users, DC=mycompany,
DC=com", "username", "passowrd")
Dim mySearcher As New DirectorySearcher(entry)
mySearcher.PropertiesToLoad.Add("CN")
Dim results As SearchResultCollection =
mySearcher.FindAll()
Dim result As SearchResult
For Each result In results
ddUsers.DataSource = result.Properties("CN")
ddUsers.DataTextField = "CN"
ddUsers.DataBind()
Next result