I have defined a DropDownListFor in my view as follows:
@(Html.Kendo().DropDownListFor(m=>m.BusinessUnitId)
.OptionLabel("Select item...")
.BindTo(new SelectList(Model.BusinessUnitList, "Key", "Value"))
)
where BusinessUnitList is a Dictionary<string, string> of value BusinessUnitIds and their descriptions.
Everything looks good on the screen and I can select a value and see its value via jQuery using: $("#BusinessUnitId").val()
However, when I try to submit the form, I get the following error:
System.ArgumentNullException
"Value cannot be null. Parameter name: items"
@(Html.Kendo().DropDownListFor(m=>m.BusinessUnitId)
.OptionLabel("Select item...")
.BindTo(new SelectList(Model.BusinessUnitList, "Key", "Value"))
)
where BusinessUnitList is a Dictionary<string, string> of value BusinessUnitIds and their descriptions.
Everything looks good on the screen and I can select a value and see its value via jQuery using: $("#BusinessUnitId").val()
However, when I try to submit the form, I get the following error:
System.ArgumentNullException
"Value cannot be null. Parameter name: items"