ASP .NET Membership: Where’s the UserID?
Friday, April 25th, 2008I couldn’t figure this out intuitively, but good news: there is a way to get it from the MembershipUser class.
They don’t call it UserID (duh) but ProviderUserKey
dim user as MembershipUser = Membership.GetUser()
dim userGUID as GUID = user.ProviderUserKey
dim userID as String = user.ProviderUserKey.toString
Click on pen to var showHover=true;
Use the Highlighter