I have a Dropdownlist which needs to call an action on a controller with the parameter value of the selected Dropdownlist value on its OnChange event.
This is what I have right now.
<%= Html.DropDownList("series",
new SelectList((IEnumerable)ViewData["series"], "ProductId", "SeriesName"),
new { onchange = "??" })%>
I can enclose the list in a form element
<form id="SeriesForm" action="<%: Url.Action("S", "ProductSearch", new {SeriesId = ?? }) %>" method="post">
But how do I set the SeriesId parameter which should be the selected value of the dropdown? I tried attaching a jQuery method to the OnChange event but I am not able to change the Url.Action method.
Thanks,