[Solved] ASP NET Core (MVC) problem with passing parameters from the view to the controller
[ad_1] Because the parameter names you accept are answer1, answer2, you should have a matching name in your view to make it possible to bind successfully. You can modify your front-end code as follows(DropDownListForto DropDownList): @model CommonEntity @using (Html.BeginForm(“Find”, “Hello”)) { @Html.DropDownList(“answer1”, new SelectList(ViewBag.Location, “Title”, “Title”)) @Html.DropDownList(“answer2”, new SelectList(ViewBag.JobTitle, “Title”, “Title”)) <button type=”submit”>Find</button> } Your … Read more