<script type="text/javascript"> function selectedIndexChanged() { } </script>
Call the function:
<%:Html.DropDownListFor(x => x.SelectedProduct, new SelectList(Model.Products, "Value", "Text"), "Please Select a product", new { id = "dropDown1", onchange="selectedIndexChanged()" })%>
Liked By
Write Answer
How to call javascript function on the change of dropdownlist in ASP.Net MVC?
Join MindStick Community
You have need login or register for voting of answers or question.
Chris Anderson
11-Oct-2011Call the function:
<%:Html.DropDownListFor(x => x.SelectedProduct, new SelectList(Model.Products, "Value", "Text"), "Please Select a product", new { id = "dropDown1", onchange="selectedIndexChanged()" })%>