I am using ‘choosen-select’ for multiselect or single select dropdown list.
Depends on condition dropdown change from single select to multiselect.
@Html.DropDownListFor(m => m.SelectedPlants, new MultiSelectList(Model.PlantList, "Value", "Text", Model.PreSelectedPlants.Select(a => a.Value))
, new { @class = "chosen-select", ID = "ddlplants", Style = "width:100%", data_placeholder = "Choose Plants..", multiple = "multiple" })
I am trying to remove ‘multiple’ from dropdownlist attribute using jquery but it’s not working.
Please any one helps me.
Thanks.