How do you submit from a dropdownlist "onchange" event from inside of an ajax form?
From the following question here: http://stackoverflow.com/questions/364505/how-do-you-submit-a-dropdownlist-in-aspnet-mvc, from inside of an Html.BeginFrom you can set onchange="this.form.submit" and changing the dropdown posts back.
However, using the following code (inside an Ajax.BeginFrom):
<% using (Ajax.BeginForm("UpdateForm", new AjaxOptions() { UpdateTargetId = "updateText" })) { %>
Top Authors
Sort by: <%=Html.DropDownList("sortByList", new SelectList(ViewData["SortOptions"], new { onchange = "this.form.submit()" })%> <%= Html.TextBox("updateText")%> <% } %>Posts back to the controller action, but the entire page is replaced with the contents of the "updateText" text, rather than just what is inside the "updateText" textbox.
Thus, rather than replacing just the area inside the Ajax.BeginForm, the entire page is replaced.
What is the correct way for the dropdownlist to call this.form.submit such that only the area inside the Ajax.BeginForm?