Can we have one partial view in another partial view in mvc ? [Resolved]

Posted by Kasani007 under ASP.NET MVC on 7/13/2015 | Points: 10 | Views : 3003 | Status : [Member] | Replies : 1
Can we have one partial view in another partial view in MVC? or Multiple Partial Views in Single Partial Views?




Responses

Posted by: Sheonarayan on: 7/14/2015 [Administrator] HonoraryPlatinum | Points: 50

Up
0
Down

Resolved
Yes, why not. To call another partial view from the partial view, use the same approach ie. @Html.Partial("_PartialViewName") or @{Html.RenderPartial("_PartialViewName")}.

You can treat partial view as User control of ASP.NET Web form. Like we can call another user control from a user control so same applies here.

Read more details about this at http://techfunda.com/Howto/asp-net-mvc/221/render-call-a-partial-view-from-a-content-page-view

Regards,
Sheo Narayan
http://www.dotnetfunda.com

Kasani007, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response