+1  A: 

I'm not for sure but I think you should create model binders. (David Hayden wrote an simple model binder)

JSC
This is also an example of string based information only. As he uses: HttpContext.Request.Form["Name"];Which is exactly what goes wrong in my case, that does not give an object I think, but rather a string. Not sure though.
bastijn
On second hand, this might actually work as:> Blockquote "You can create your own Custom Model Binders for Customer that instantiates a new Customer Instance and adds the appropriate form values to the various Customer Properties"sounds promising.
bastijn
+2  A: 

Edited to use Guid:

With dropdownlists I use a slightly different approach. It might be possible to get your viewmodel working, but for me it is easier this way:

public class VacaturesFormViewModel
{

    public IEnumerable<SelectListItem>EducationLevels{ get; set; }
    public Guid EducationLevelID{ get; set; }

}

The EducationLevelID will have the selected id of your Dropdown. This is the view:

<%= Html.DropDownList("EducationLevelID", Model.EducationLevels)%>

Controller

  IEnumerable<SelectListItem> educationLevelList =
                            from level in GetLevelList()
                            select new SelectListItem
                            {
                                Text = level .Name,
                                Value = level.Uid.ToString()
                            };
  model.EducationLevels = educationLevelList ;
Malcolm Frexner
The problem is that I that my EducationLevelID is not an int (as is supported by dropdownlist?) but a GUID which is not supported at once. You have to generate the GUID from the return of the dropdownlist yourself as far as I know. Which means I still have to do the steps I did before.
bastijn
I checked and the Guid is not a problem.The edited code uses IEnumerable<SelectListItem> but there should be no differnce to SelectList
Malcolm Frexner
+1  A: 

You could bind educationID parameter automatically:

[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Create(Guid? educationID, FormCollection form)
{
    Vacatures vacatureToAdd = new Vacatures();

    if (educationID != null)
    {
        vacatureToAdd.EducationLevels = 
            repository.GetEducationLevelByID(educationID.Value);
    }
Alexander Prokofyev