I have the following properties
public SelectList ListActivities { get; set; } // Will load all hobbies i,e football, golf etc and will be displayed in a dropdown
public List<string> SelectedActivities { get; set; } // Trying to set with multiple selected values.
This is my view.
<div class="col-lg-11">
@Html.DropDownListFor(m => m.UserDetails.SelectedActivities, Model.UserDetails.ListActivities, "Please Select", new { @class = "form-control", multiple = "multiple", id = "listActivities" })
</div>
The issue I have is when I selected more then one option from the ActivitiesDropdown and press submit on my page and go back to the controller the SelectedActivities is null.
Can one shed some light on this please?