I have partial view which takes customer object and renders html. For customers list, how to merge output of the partial view on server side like similar to having renderpartial with foreach loop in the view.
//how to write action method for below
foreach(var item in customerslist)
{
//get html by calling the parview
outputhtml += //output from new _partialviewCustomer(item);
}
return outputhtml;
You could render a partial to a string using the following extension method:
and then: