dirEntry = New System.DirectoryServices.DirectoryEntry("LDAP://" & " & Environment.UserDomainName & ") dirSearcher = New System.DirectoryServices.DirectorySearcher(dirEntry) dirSearcher.Filter = "(samAccountName= " & txt_Usr_ID.Text & ")" dirSearcher.PropertiesToLoad.Add("GivenName") dirSearcher.PropertiesToLoad.Add("sn") dirSearcher.PropertiesToLoad.Add("mail") Str_Searchres = dirSearcher.FindOne() Dir_direntry = Str_Searchres.GetDirectoryEntry() Str_Usr_ID = txt_Usr_ID.Text Str_Fname = Dir_direntry.Properties("GivenName").Value.ToString() Str_Lname = Dir_direntry.Properties("sn").Value.ToString() Str_Mail = Dir_direntry.Properties("mail").Value.ToString()
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)