Home »

How to call javascript function on the change of Dropdown List in ASP.NET MVC?

Question ListCategory: ASP.NETHow to call javascript function on the change of Dropdown List in ASP.NET MVC?
jully882 author asked 10 years ago
1 Answers
ethanbrown author answered 9 years ago

Create a java-script function:

Call the function:

<%:Html.DropDownListFor(x => x.SelectedProduct,

new SelectList(Model.Products, “Value”, “Text”),

“Please Select a product”, new { id = “dropDown1″,

onchange=”selectedIndexChanged()” })%>

Please login or Register to Submit Answer