Last post May 30, 2008 02:57 PM by jose_jimenez
May 30, 2008 01:23 PM|Accomplice|LINK
I am developing an "Intranet" for the company I work for, and I am new to using asp.net. I have a department page developed, however I am looking to make the contacts display at the bottom of the page. I already have the formatting and such developed using
XHTML 1.0 Transitional and CSS, however rather than having to constantly change the html file, I was looking to have the information for each contact display by grabbing certain information from Active Directory. This information would include their name,
Title, Phone/Fax Contacts. I am familiar with how variables work, however not familiar with the asp.net lingo.
Any help would be much appreciated. Thanks in advance!
May 30, 2008 02:57 PM|jose_jimenez|LINK
you have to know a bit about .net and activedirectory to get this to work. You also need to know something about your domain. Take a look at http://msdn.microsoft.com/en-us/library/system.directoryservices.directorysearcher(VS.80).aspx for information
about the directory searcher
you can create a directory entry to use as the root of the directory searcher (http://msdn.microsoft.com/en-us/library/system.directoryservices.directoryentry(VS.80).aspx). Construct it using LDAP syntax such as DE = new DirectoryEntry("LDAP://mydomain");
Then you can use the directorysearcher to find specific entries by using the filter property (http://msdn.microsoft.com/en-us/library/system.directoryservices.directorysearcher.filter(VS.80).aspx) and the FindOne or FindAll methods.
Once you have a SearchResult or SearchResults you can look at the properties of the searchresult to get what you want out of it.