Hello All,
I wish to seek your guidance on this question. How do we post strong type to the controller? More specifically, can we post the selected data-item to the controller?
Here is the sample form:
<form asp-controller="home" asp-action="UpdateMenu" method="post"> <!-- Input and Submit elements --> @(Html.Kendo().DropDownList() .Name("selectedOptions") .DataTextField("Name") .DataValueField("ID") .DataSource(source => { source.Read(read => { read.Action("OptionList", "home"); }); }) ) <button type="submit">Update</button></form>
Here is the controller:
[HttpPost]public void UpdateMenu(Menu targetMenu, string[] selectedOptions){ ....}
I am able to get the selected ID to bind to the selectedOptions variable but no luck with the data-item object.
Thank you for your time.
