In a .aspx page, I can get the identity of the current user with:
Dim CurrentUser as string = User.Identity.Name
In a class (for example, MyClass.vb), User,Identity.Name gives the error:
"User" is not declared. It may be inaccessible due to its protection level.
I've tried importing Microsoft. VisualBasics.ApplicationServices to no avail.
Your help would be much appreciated.
Thanking you in anticipation.
Roger