Sunday, June 24, 2018
How we can call a JavaScript function on the change of a Dropdown List in MVC?
Create a JavaScript method:
Invoke the method:
<%:Html.DropDownListFor(x => x.SelectedProduct, new SelectList(Model.Customers, “Value”, “Text”), “Please Select a Customer”, new { id = “ddlCustomers”, onchange=” DrpIndexChanged ()” })%>