ASP.NET MVC CheckBoxList from model with List Property
问题 Apologies if the title is unclear. I'm trying to return my model from a form submit in ASP.NET MVC. My question is nearly the same as this question, only differing in that I don't have a List<Model> but a model like: public Model { string UserName {get; set;} string Password {get; set;} List<Roles> UserRoles {get; set;} } where I need the UserRoles as checkboxes that the admin can select from when creating a new user. My question is, I'm unsure how to use a '@Html.CheckBoxFor' against a list.