Keep user id in session?

Present user data, where can I store the user ID of the user who is currently logged in? session?

+4
source share
2 answers

Yes, a session would be a suitable place for this information. Assuming you are using the authentication features that are baked into the ASP.NET framework, you either load the user ID from HttpContext.Current.User.Identity.Name, or view it using this value.

+6
source

Yes. sesssion is used to store user data.

+3
source

All Articles