How to display basic Account Information for ASP.NET?
I was wondering if a user logs i开发者_StackOverflow社区n 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?
Assuming you're using ASP.NET Membership:
HttpContext.Current.User.Identity.Name
Have you tried LoginStatus and LoginName ASP.NET controls?
精彩评论