![](/img/trans.png)
[英]How do you get the Profile variable populated in a view in ASP.NET MVC?
[英]How do you get the membership profile of a user in an ASP.NET MVC3 razor view?
使用以下代碼段在mvc2中可以正常工作:
<%= Profile %>
但是在我的剃刀視圖中,我無權訪問個人資料。 從現在開始我在哪里得到它?
您可以這樣獲得:
@{
var profile = Context.Profile;
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.