Get the current logged in user id (MVC3)





0/5 (0 vote)
hi every one!i will show a way that you will get the current logged in user id.it can be done by generating a GUID from the ProviderUserKey of
hi every one!
i will show a way that you will get the current logged in user id.
it can be done by generating a GUID from the ProviderUserKey of the current logged in user like this
Guid cur_user_id = (Guid)Membership.GetUser().ProviderUserKey;
that's it ..