开发者

asp.net MVC rendering partial views from another area

开发者 https://www.devze.com 2023-04-12 23:34 出处:网络
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)

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.Render开发者_JS百科Partial("~Warehouse/Views/Shared/SummaryUC", Model.Summary); %> ???


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.

0

精彩评论

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

关注公众号