From an earlier era of this site. Left here for the record.
Get the username of the currently logged in user
If you want to get the username for the currently logged in user you can use the following code;
Public Shared ReadOnly Property Username() As String
Get
Return System.Environment.UserName
End Get
End Property
This site uses a single essential cookie to remember your preference. Analytics are optional and only load if you accept. See the privacy policy for details.