Joined
Last Seen
0 Reputation Points
Unknown Quality Score
No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
0 Endorsements
Ranked #107.70K
1 Posted Topic
Following code returns the login name when you call it with fullName as a parameter. public string getLoginName(string fullName) { string loginName=string.Empty; try { DirectorySearcher dsLogin = new DirectorySearcher(); dsLogin.Filter = "displayname=" + fullName; SearchResult result = dsLogin.FindOne(); DirectoryEntry userInfo = result.GetDirectoryEntry(); //getting user name loginName = (string)userInfo.Properties["samaccountname"].Value ?? string.Empty; …
The End.
paulreg