Thursday, September 29, 2011

How to Find the UserID using Membership

I have a table which is driven by the UserID which is assigned when a new user is added to the database using Membership.

My application needs to retrieve the UserID on the fly in order to be able to find the correct record.
One way to do this is the following:

Membership.GetUser().ProviderUserKey.ToString();

I hope this helps,
Will




No comments:

Post a Comment