multiples partials views in mvc 5 code example
Example: asp.net mvc render multiple partial views
@{
int loopThisManyTimes = 10;
for (int i = 0; i < loopThisManyTimes; i++)
{
MyModel model = new MyModel();
Html.RenderPartial("<Your view name>", model);
}
}
$.ajax({
type: "POST",
url: '<Your URL>',
contentType: "application/text; charset=utf-8",
dataType: "text",
success: function (data) {
$("<Your container id>").html(data);
},
error: function (errData) {
$("<Your container id>").html(errData);
}
});