Haroon
Haroon

Reputation: 3472

asp.net MVC rendering partial views from another area

My layout of areas is such:

Warehouse/

ClientProcesses/

SupplierProcess/

Inside "Warehouse/" - I have a partial view called "summaryUC", I want to access this from inside the view (aspx file) from "ClientProcess area" or "SupplierProcess area" how can i do that?

<% Html.RenderPartial("SummaryUC", Model.Summary); %>

<% Html.RenderPartial("~Warehouse/Views/Shared/SummaryUC", Model.Summary); %> ???

Upvotes: 3

Views: 2891

Answers (1)

cpoDesign
cpoDesign

Reputation: 9153

Hi what you can do is put the partial view to location that is accesible everywhere. so if you have partial view shared between areas, put the partial view into root/views/shared

this will ensure that they will be always found.

Upvotes: 2

Related Questions