【发布时间】:2013-08-30 23:44:58
【问题描述】:
我有任何型号
public class Account
{
[Key]
public int AccountID { get; set; }
public string UserName { get; set; }
public string Password { get; set; }
public string FullName { get; set; }
}
还有
public class Role
{
[Key]
public int RoleID { get; set; }
public string RoleKey { get; set; }
public string RoleName { get; set; }
}
还有
public class AccountRole
{
[Key]
public int ID { get; set; }
public int AccountID { get; set; }
public string Role { get; set; }
}
我想使用一个视图更新帐户和列表角色来列出复选框。当我选中复选框时,将角色插入到 AccountRole。
请告诉我如何创建我的视图。
【问题讨论】:
标签: asp.net-mvc-3 checkboxlist checklistbox