I have a dropdown list in an MVC view. On selection change of dropdown list I want to call specific action method in the controller.
What I have done on view is this :>
Your approach should work. The issue you're encountering is your use of this
in your onchange
event is invalid. Try replacing your this.form
references with something like this:
<%= Html.DropDownList(
"ddl", ViewData["AvailableList"] as SelectList,
new { onchange = @"
var form = document.forms[0];
form.action='MyMethod';
form.submit();"
} ) %>