Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
您好,谁能帮我如何获取用户的用户 ID?如果我写 User.Identity.Name 我得到用户的名字,如果我写 User.IsInRole 我得到用户的角色。我必须写什么才能获得用户ID?
谢谢你
尝试这个 -
MembershipUser user = Membership.GetUser(User.Identity.Name); Guid userId = (Guid)user.ProviderUserKey;
我试图将 commandLink 放在数据表的列中,但是单击链接,在 backbean 中未调用该方法,屏幕刷新并且没有任何反应。
我知道互联网上有几个关于我的问题的话题。我已经尝试了所有解决方案并且 donk 工作。我尝试更改 bean 的范围,尝试切换到 h:commandLink 我清理了我的 html 并删除了模板,但没有解