I want to populate the Combo Box with the users in the LDAP Directory without looping thru the SearchResult of directorySearcher Search Result. how can i Achieve the same. the reason is the code takes a longer time to loop thru. if there was any code which would let me populate the Datatable which is used as datasource for my Combo Box with all the data in the search result would be helpful. i want only 3 properties of the LDAP viz Mail, SAM Account Name and Name.
Thanks in Advance
DirectoryEntry ADSEntry = new DirectoryEntry("LDAP://" + DomainName);
DirectorySearcher mySearcher = new DirectorySearcher(ADSEntry);
mySearcher.Filter = "(&(objectCategory=user)(name=*))";
mySearcher.Sort = new SortOption("name", SortDirection.Ascending);
SearchResultCollection src = mySearcher.FindAll();
// What should i do next......