我怎样才能得到会员asp.net 2008年当前用户名 [英] How can I get CURRENT USERNAME in membership asp.net 2008
本文介绍了我怎样才能得到会员asp.net 2008年当前用户名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我用asp.net 2008年入会,我建立了一些卷一个登录系统...等
我有一个数据库和表的关键是用户名,现在我想知道我怎么能得到谁登录的会员用户名?
例如:
我登录的TURKI
我想获得的用户名TURKI
我真的需要帮助...
感谢,
解决方案
User.Identity.Name
用户是页的属性。如果你需要在其他地方访问它,你可以使用:
HttpContext.Current.User.Identity.Name
I use a membership in asp.net 2008. And I build a login system with some rolls ...etc
I have a database and tables and the KEY is "username", and now I want to know how can I get a username for the member who logged in ?
for example: I logged in as TURKI I want to get the username TURKI
really I need for help...
thanks,
解决方案
User.Identity.Name
User is a property of the page. If you need to access it elsewhere, you can use:
HttpContext.Current.User.Identity.Name
这篇关于我怎样才能得到会员asp.net 2008年当前用户名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文