开发者

How to display basic Account Information for ASP.NET?

开发者 https://www.devze.com 2023-02-07 20:18 出处:网络
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

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?

0

精彩评论

暂无评论...
验证码 换一张
取 消