How can a multi-select-list be edited using asp.net mvc?

Posted by Anders Juul on Stack Overflow See other posts from Stack Overflow or by Anders Juul
Published on 2009-06-15T08:46:15Z Indexed on 2010/05/15 18:04 UTC
Read the original article Hit count: 817

Filed under:
|
|

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 in mvc, I get only strings and booleans (not shown below) mapped. Many of the examples I find on google utilizes early releases of the mvc framework whereas I use the official 1.0 release.

Any examples of the view is appreciated.

public class NewResultsState
{
    public IList<User> UsersGrossList { get; set; }
    public IList<User> UsersSelectedList { get; set; }
}

© Stack Overflow or respective owner

Related posts about asp.net-mvc

Related posts about c#