65.9K
CodeProject is changing. Read more.
Home

Get the current logged in user id (MVC3)

emptyStarIconemptyStarIconemptyStarIconemptyStarIconemptyStarIcon

0/5 (0 vote)

Oct 11, 2013

CPOL
viewsIcon

13140

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 ..