Scenario
I am having dropdownlist on a page, now on the change event of it I would like to pull some data from database and then display it.
I am able to do it with postback, I tried using Ajax.Beginform() but it still doing a post back.
<script src="../../Scripts/MicrosoftAjax.js" type="text/javascript"></script>
<script src="../../Scripts/MicrosoftMvcAjax.js" type="text/javascript"></script>
<%using (Ajax.BeginForm("UpdatePanel", new AjaxOptions { UpdateTargetId = "divDetails" }))
{%>
<%=Html.DropDownList("Dinner", (SelectList)ViewData["Dinner"], new { onchange = "this.form.submit();" })%>
<div id="divDetails">
<fieldset>
<legend>Details</legend>
<% if (Model != null)
{%>
<p>
ID:
<%= Html.Encode(Model.ID)%>
</p>
<p>
Title:
<%= Html.Encode(Model.Title)%>
</p>
<%} %>
</fieldset>
<%} %>
Any help appreciated.