Only on Experts-Exchange: Sign-up for a free-trial and we'll send you your permanent license!
Here is what you get: 30 Nodes | Unlimited Sensors | No Time Restrictions | Absolutely FREE!
Act now. This offer ends July 14, 2017.
Public Sub FillDropdown() Dim ldapPath As String = "LDAP://CN=GroupName,DC=Departments,DC=ad,DC=domain,DC=com" Dim de As New DirectoryEntry(ldapPath) Dim ds As New DirectorySearcher(de) ds.PageSize = 1000 ds.Filter = "(objectCategory=User)" Dim colUsers As ArrayList colUsers = New ArrayList Dim result As SearchResult For Each result In ds.FindAll() colUsers.Add(result.Properties("cn")(0)) Next result colUsers.Sort() DropDownList1.DataSource = colUsers DropDownList1.DataBind() de.Dispose() End Sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.