[AllowAnonymous]
public ActionResult Register()
{
ViewBag.roleList = DALUser.GetRoleList();
ViewBag.stateList = DALUser.GetStateList();
return View();
}
<li>
@Html.LabelFor(m => m.role)
@Html.DropDownListFor(m => m.role, new SelectList(ViewBag.roleList, "Select Role"))
</li>
原因となる
「値を null にすることはできません。パラメータ名: items」. roleList と stateList は単なる文字列リストです
誰でもこれについて考えがありますか?