I am trying to get the currently logged in user's UserId as mentioned in this post http://msdn.microsoft.com/en-us/library/aa478949.aspx as part of the aspnet_Membership table.
Here's where I am looking:
MembershipUser user = null;
if (User != null && User.Identity != null && !string.IsNullOrEmpty(User.Identity.Name))
{
user = Membership.GetUser(User.Identity.Name);
}
if (user != null)
{
//int id = user.UserId;
}
MembershipUser does not have a UserId. I am trying to user the UserId as a foreign key for other tables I will create. I can use the UserName, but I figured it may be better to use the UserId.