Render two or more partial views
I have an Ajax.Actionlink that fires to a method that is placed inside my controller which returns a list of users and renders a partial view.
[Authorize]
public ActionResult UsersAddresses()
{
...
...
return PartialView("AddressesList",users);
}
Is there any way how I can render two or more partial views at the s开发者_JAVA技巧ame time?
Thanks
If you're just trying to concatenate partial views together, make a partial view (we'll just call it Parent), then within that view call Html.RenderPartial() as many times as you need. Then your controller can just return a View / PartialView for Parent, supplying the proper aggregate view data.
精彩评论