Below are the code for calling an action when Dropdown Change
<script type="text/javascript">
$(document).ready(function () {
$("#DropDownId").change(function () {
var value = $('#DropDownId').val();
jQuery.ajax({
type: "POST",
url: "@Url.Content("~/Controller/ActionName/")",
data: "value="+value,
success: function(result){
$('#mainDivIdForAppendingPartialView').html(result);
},
error: function(result){
}
});
});
});
</script>
ActionResult Returns Partial View
public ActionResult ActionName(string value)
{
if(value=="section1")
{
return PartialView("_partialView1",section1Model);
}
else if(value=="section2")
{
return PartialView("_partialView2",section2Model);
}
else
{
return PartialView("_partialView3",section3Model);
}
Create three partialViews under the same view folder by right clicking the ActionName
and Create the partialViewPage you want. Please go through this link for creating partialView
http://www.c-sharpcorner.com/UploadFile/cd3310/create-partial-view-in-Asp-Net-mvc-3-application/[
^]