I have an mvc app where I want to assign a user to a profile. I have two multiline select lists (i.e <select size="10"></select>). One for profiles the user is part of and one for the available profiles the user can become part of.
I am using JavaScript with two buttons to move the items between the two lists. When the form submits the Request.Form object only knows about options that are selected in either list but I want to know all the items that are in the 'profiles the user is part of' list.
What can I do to acheive this? I was thinking of using a hidden field and placing the values in the field when they are moved to the 'profiles the user is part of' list. (i.e. <input type="hidden" name="user_profiles" values="3,8,12">).
What do you think? Is there a better way to do this? Thanks.