Populate a Drop Down List with Group Members Exception.......

Posted on 2010-11-30
Last Modified: 2012-05-10
I've done this in the past, and even got help with it here.  The difference, in this case, is that before the group name within the LDAP path was designated as OU=GroupName. The group I'm working with now is CN=GroupName.

It would follow that I could just change the existing code to CN=GroupName and that would fix it but the drop down list isn't populating. I'm hoping it's something trivial that I missed.

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()


        Next result


        DropDownList1.DataSource = colUsers



    End Sub

Open in new window

Question by:JB4375
  • 2
LVL 83

Accepted Solution

CodeCruiser earned 500 total points
Comment Utility

Author Closing Comment

Comment Utility
Thanks CC!!
LVL 83

Expert Comment

Comment Utility
Glad to help :-)

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Companies that have implemented Microsoft’s Active Directory need to ensure that the Active Directory is configured and operating properly. If there are issues found and not resolved, it eventually leads the components to fail or stop working and fi…
Introduction You may have a need to setup a group of users to allow local administrative access on workstations.  In a domain environment this can easily be achieved with Restricted Groups and Group Policies. This article will demonstrate how to…
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now