2012-08-10

How to get the User ID of currently logged in user

When using asp.net membership provider, sometimes we need to get the user ID of the logged in user. We can get it like below.

Guid userGuid = (Guid)Membership.GetUser().ProviderUserKey;

No comments: