how to render partial view in mvc at virw code example
Example 1: mvc c# return renderPartial
<div id="ViewHolder"><div>
$.ajax({
type: "POST",
url: '<Your path to your controller>/GetView',
contentType: "application/text; charset=utf-8",
dataType: "text",
async: false,
success: function (data) {
$('ViewHolder').html(data);
}
})
public PartialViewResult GetView()
{
MyModel myModel = new MyMyodel();
return PartialView("<Your View Name>", myModel);
}
Example 2: partial MVC
<partial name="ThenName" model="object" />