With the following code:
<script type="text/javascript" src="../../Scripts/jquery-1.4.1.js" />
<script type="text/javascript">
$(function () {
$('#selectOptions').change(function () {
$(this).parents('form').submit();
});
});
</script>
...
<% using (Html.BeginForm("PostedValue", "Home"))
{ %>
<%: Html.DropDownList("selectOptions", new List<SelectListItem>
{ new SelectListItem{ Text="1", Value="1"},
new SelectListItem{ Text="2", Value="2"},
new SelectListItem{ Text="3", Value="3"}},
"Select List")%>
<%} %>
</div> </body>
</html>
What am I doing wrong?