April 2008
M T W T F S S
    May »
 123456
78910111213
14151617181920
21222324252627
282930  

Archives

Meta

Recent Posts

Tags

asp .net asp .net membership browsers computer crash Guy Burstein javascript link-o-rama LINQ office 2007 optimization outlook 2007 performance ScottGu SQL Server t-sql web servers workarounds xmlhttprequest

Archive for April 25th, 2008

ASP .NET Membership: Where’s the UserID?

Friday, April 25th, 2008

I 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;