I've got a literal control to display the username of the user logged into our companies intranet system, originally I had a LoginName control but couldn't get strip to remove the domain from the username (as the format is domainname\username) so I'm trying it this way.
protected void Page_Load(object sender, System.EventArgs e)
string Parts = User.Identity.Name.Split("\\");
if (Parts.Length == 2)
loginName.Text = Parts;
loginName.Text = User.Identity.Name;
View Complete Post