Rendering a simple ASP.NET MVC PartialView using JQuery Ajax Post call
this line is not true: url: "@Url.Action("GetPartialDiv/")" + $(this).val(),
$.ajax
data
attribute is already included route value. So just define url in url
attribute. write route value in data
attribute.
$(".SelectedCustomer").change( function (event) { $.ajax({ url: '@Url.Action("GetPartialDiv", "Home")', data: { id : $(this).val() /* add other additional parameters */ }, cache: false, type: "POST", dataType: "html", success: function (data, textStatus, XMLHttpRequest) { SetData(data); } });});