Wow, what a mouthful. I am a bit sick of StackOverflow's policy for today.
So here it is : I want a dropdown list to cause submission of my Ajax form to retrieve some JSON formatted results for use elsewhere in the page.
@{using (Ajax.BeginForm("SelectState",
"Census",
new AjaxOptions() {
HttpMethod = "Post",
OnSuccess = "SelectComplete",
OnFailure = "Fail" }))
{
@Html.DropDownList("ddlState",
(SelectList)ViewData["StateList"],
new { onchange = "$('#bSetName').click()" });
<input id="bSetName" name="bSetName"
style="display: block;" type="submit" />
}
}
No comments:
Post a Comment