If you use the LOGON_USER ServerVariable, or User.Identity, to get the logged in user name, then you’ll know that you get it in the following form:
DOMAIN\USERNAME
To get these separately, do something like this:
Dim USERNAME As String = UCase(Request.ServerVariables("LOGON_USER")) lblIdentity.Text = USERNAME.Substring(USERNAME.LastIndexOfAny("\") + 1)
and
lblDomain.Text=USERNAME.Substring(0, USERNAME.IndexOf("\"))