How to get a user ID in a membership?

I know how to get user id for current user

MembershipUser currentUser = Membership.GetUser(); Guid currentUserId = (Guid)currentUser.ProviderUserKey; 

But for my application, I need to get a user ID that is also not registered. Since I need to assign the user ID to another table that I use.

Thanks at Advance

+6
asp.net-membership
source share
1 answer

Use the Membership.GetUser(username, userIsOnline) , passing false as the userIsOnline parameter.

+3
source share

All Articles