更新用户角色asp.net身份

时间:2019-07-13 15:02:46

标签: asp.net-mvc

我正在使用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" />

对控制器有什么想法吗?

0 个答案:

没有答案
相关问题