I\'d like to edit an object like the one below. I\'d like the UsersSelectedList populated with one or more Users from the UsersGrossList.
Using the standard edit-views i
@ eu-ge-ne < thankyou so much for your answer - was having real trouble finding a way to multiselect a list of values from and to model. Using your code I used the ListBoxFor Html control in my Edit/Update page and passed the whole model back to my controller (including the mulisple selected values) on Save.
<%= Html.ListBoxFor(model => model, Model.UsersGrossList.Select(
x => new SelectListItem {
Text = x.Name,
Value = x.Id,
Selected = Model.UsersSelectedList.Any(y => y.Id == x.Id)
}
) %>