How to use partial view from another project in asp.net mvc

前端 未结 2 843
情深已故
情深已故 2021-01-17 13:12

I have two MVC projects one as a parent project and the other as a child project. The child project adds reference to the parent project. I like to use partial views from th

2条回答
  •  情歌与酒
    2021-01-17 14:03

    Not really good, but simple solution that can solve your problem. One of overloads @Html.Partial() allows you to write full path to your View.

    Something like this:

    @Html.Partial("~/View/Shared/_GenericGreeting.cshtml")
    

提交回复
热议问题