Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

How to Display Users From Active Directory?

  Asked By: Dejuan    Date: Apr 20    Category: Sharepoint    Views: 1361

I want some solution of Display users from Active Directory in
WebPart. I am trying to write webpart for my solution.

Share: 

 

4 Answers Found

 
Answer #1    Answered By: Ana Payne     Answered On: Apr 20

You can use this Wrapper API for that task. Check this link, I am sure it
will answer your question with sample code.

http://www.codeproject.com/dotnet/Wrapper_API.asp

 
Answer #2    Answered By: Hema Hegde     Answered On: Apr 20

use the the directory  services of .NET to do this

here is the sample code

System.DirectoryServices.DirectoryEntry entry = new
System.DirectoryServices.DirectoryEntry("LDAP://multilynx.local","usman","bc001u\
mx");
System.DirectoryServices.DirectorySearcher mySearcher = new
System.DirectoryServices.DirectorySearcher(entry);
mySearcher.Filter = "(&(objectClass=user)(objectCategory=person))";
mySearcher.SearchScope=SearchScope.Subtree;
SearchResultCollection src=mySearcher.FindAll();
for(int i=0;i<src.Count;i++)
{
rtb.Text+="\n\r" + src[i].Properties["cn"][0].ToString();
}

here rtb is rich text box

if u have any probelm plz let me know

 
Answer #3    Answered By: Lacey Daniels     Answered On: Apr 20

Can you provide specific instructions, please?

 
Answer #4    Answered By: Megan Martin     Answered On: Apr 20

what kind of instructions u need ?????

 
Didn't find what you were looking for? Find more on How to Display Users From Active Directory? Or get search suggestion and latest updates.




Tagged: