Get Current user id in mvc

Posted by  Jiya Aahuja
 1380  View(s)
Ratings:
Rate this:

I want current loged in UserId 

How do I get the current user inside a controller class in ASP.NET MVC?

  1. Re: Get Current user id in mvc

    if you are using web security then you can get current user id by this code

    WebSecurity.CurrentUserId

Answer