I am trying to create a multiple select from a single select drop down menu. my model originally had:
public int country_id { get; set; }
and my view had:
@Html.DropDownList("country_id", String.Empty)
to change it to multiple select i changed my model to:
public List<Country> country_id { get; set; }
and my view to:
@Html.ListBoxFor(model => model.country_id, ViewBag.ActionsList as MultiSelectList, new { @class = "multiselect", @style = "width: 450px;height:200px" })
the problem i am having is updating my databse using migration since the i am changing int to list, however, it keeps saying
"Cannot drop the index 'dbo.People.IX_country_id', because it does not exist or you do not have permission."
I do have permission so I am not sure if I am missing something?
My list of countries is coming straight from the country database.
thanks for your inputs.