ASP.Net MVC Cascading ListBox Error: The parameter expression must evaluate to an IEnumerable when multiple selection is allowed

Last Reply 2 months ago By dharmendr

Posted 2 months ago

hello,

i am using this snippet

Cascading (Dependent) Country State City DropDownLists using jQuery AJAX in ASP.Net MVC 

when i replace dropdown helper to listbox like this so it gives error 

The parameter 'expression' must evaluate to an IEnumerable when multiple selection is allowed.

@Html.DropDownListFor(m => m.CountryId, Model.Countries, "Please select")

change to
    
@Html.ListBoxFor(m => m.CountryId, Model.Countries, "Please select")

pls advice instead of dropdownlist i want listbox

You are viewing reply posted by: dharmendr 2 months ago.