我正在使用asp.net Identity,我可以创建角色并为用户分配角色,但我想更新AspNetUserRoles表中特定用户的退出角色 查看:
@using (Html.BeginForm("EdituserRole", "Roles", FormMethod.Post)) @Html.AntiForgeryToken()
@Html.ValidationSummary(true)
<p>
Username : @Html.DropDownListFor(m => m.Roles, ViewBag.role as SelectList, "Select " )
Role Name:@Html.DropDownListFor(m => m.UserName, ViewBag.userslist as SelectList, "Select ")
</p>
<input type="submit" value="Update" />
对控制器有什么想法吗?