http://forums.asp.net/t/1045923.aspxstring windowsLogin = Page.User.Identity.Name;
//Normally if the domain is present you get a string like DOMAINNAME\username, remove the domain
int hasDomain = windowsLogin.IndexOf(@"\");
if (hasDomain > 0)
{
windowsLogin = windowsLogin.Remove(0, hasDomain + 1);
} //end if
No comments:
Post a Comment