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. 關於Hmac用戶認證的說明
- 3. 使用說明
- 4. 使用clipRect - 說明
- 5. 說明
- 6. 說明
- 7. 說明
- 8. Magento - 使用簡短說明適用於Google基本說明
- 9. Beacon UUID說明
- 10. 幫助說明
- 11. NLS_NCHAR_CHARACTERSET說明
- 12. Swagger UI說明
- 13. PHP在 '說明'
- 14. 圖片說明
- 15. 日期說明
- 16. 訪問說明
- 17. 按照說明
- 18. 說明numpy.where
- 19. OpenWriteCompletedEventArgs.Result說明?
- 20. 線程說明
- 21. 「.OFF」說明
- 22. NullPointerException的說明
- 23. 主題說明
- 24. 錶行說明
- 25. timeval_subtract說明
- 26. C++宏說明
- 27. Asp.net ViewState說明
- 28. 函數說明
- 29. MongoDB GridFS說明
- 30. .add()說明
您使用ASP.Net會員? – hunter 2010-11-24 14:50:08