0
A
回答
2
您可以通过使用控制器的动作里面User
财产取得认证的用户名,然后查询memebership提供检索存储在数据库中的其他用户信息:
[Authorize]
public ActionResult Foo()
{
// fetch the connected user from the authentication cookie
string username = User.Identity.Name;
// query the datastore to retrieve additional user information
var userInfo = Membership.Provider.GetUser(username, false);
string email = userInfo.Email;
string comment = userInfo.Comment;
return View();
}
相关问题
- 1. 用户接口说明
- 2. 复制用户说明,并用相同的说明添加新用户
- 3. 关于Hmac用户认证的说明
- 4. 使用说明
- 5. MVC.Net
- 6. 使用clipRect - 说明
- 7. Android应用说明
- 8. 说明
- 9. 说明
- 10. 说明
- 11. 说明
- 12. 说明
- 13. 说明
- 14. Magento - 使用简短说明适用于Google基本说明
- 15. 用例说明与用例说明相同吗?
- 16. IPP V3客户说明不通过
- 17. Iterables/generators说明
- 18. “.OFF”说明
- 19. Vaadin Google说明
- 20. Asp.net ViewState说明
- 21. MultiScaleImageSource GetTileLayers说明
- 22. MIPS说明:SW
- 23. numpy.meshgrid说明
- 24. 代码说明
- 25. pthread_cond_timedwait()&pthread_cond_broadcast()说明
- 26. 在说明
- 27. NullPointerException的说明
- 28. 方案说明
- 29. HashMap/HashTable说明
- 30. cvResize说明,OpenCV
您使用ASP.Net会员? – hunter 2010-11-24 14:50:08