0

私のプロジェクトでは、MVC3 で Razor を使用しています。メンバーシップを使用してユーザー登録を処理し、すべてのユーザーをtable.

ここに私のアクションがあります:

 public ActionResult ListProfile()
    {
        //ProfileInfoCollection profiles = ProfileManager.GetAllProfiles(ProfileAuthenticationOption.All);
        //return View(profiles);
        var users = Membership.GetAllUsers();
        return View(users);
    }

私の見解 :

 @inherits System.Web.Mvc.ViewPage<MembershipUserCollection>
 @{
 ViewBag.Title = "Documents";
 }

<h2>Liste des documents</h2>
<table style="width: 100%;">
<tr>
    <th>Nom
    </th>
</tr>

@foreach (MembershipUser item in Model)
{
    <tr>
        <td>
            <h4>
                @item.UserName

            </h4>
        </td>


    </tr>
}

</table>

しかし、私はエラーが発生します: CS0115: 'ASP._Page_Views_AccountProfile_listProfile_cshtml.Execute()': no suitable method found to override

4

1 に答える 1