【发布时间】:2009-05-28 04:46:16
【问题描述】:
我正在使用 asp.net 配置管理器和标准登录控件来允许用户登录。
能否从业务层找到当前登录的用户,还是需要从 UI 中传入?
【问题讨论】:
我正在使用 asp.net 配置管理器和标准登录控件来允许用户登录。
能否从业务层找到当前登录的用户,还是需要从 UI 中传入?
【问题讨论】:
试试这个:
HttpContext.Current.User.Identity.IsAuthenticated
//OR you may put user into session and access it like this
HttpContext.Current.Session["user"]
【讨论】: