Reputation: 12437
I was wondering if a user logs in using the login controller for asp.net, how do I display the users information in a "My Account" page. Do I simply do that through C# and SQL? Is there something that gets stored when a user logins already so I can return the username anywhere in the project?
Upvotes: 0
Views: 348
Reputation: 2962
Have you tried LoginStatus and LoginName ASP.NET controls?
Upvotes: 1
Reputation: 2038
Assuming you're using ASP.NET Membership:
HttpContext.Current.User.Identity.Name
Upvotes: 1