开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜