コントローラ:
public ActionResult Details(int id)
{
ViewBag.AccountType = new BusinessLayer.AccountTypeManager().GetAccountTypes();
return View(new BusinessLayer.AccountManager().getAccount(id));
}
意見:
<div class="display-label">Account Type</div>
<div class="display-field">@Html.DisplayFor(modelItem => modelItem.AccountType)</div><br />
この現在のビューには、AccountType ID が表示されます。ViewBag.AccountType (IEnumerable) によって渡される AccountType 名を表示するにはどうすればよいですか