I have two mvc projects in the same solution. The parent project Name is WebAPP and the child project name is SocialMedia.
In the SocialMedia project I have a partial view named "_partialSocialMedia.cshtml". I am using it easily in the SocialMedia project, as follows:
@{
Html.RenderPartial("~/Views/Shared/_partialSocialMedia.cshtml");
}
I want to use the same partial view into the parent project without re-creating it. I have tried to use it like this:
@{
Html.RenderPartial("~/SocialMedia/Views/Shared/_partialSocialMedia.cshtml");
}
But it is giving me an error as the view is not found in the specific path. I have tried a lot of tricks using different path specifications.
Please note: I have already added the SocialMedia project as a reference into WebApp (the parent project) and the partial view exist in the following folder: SocialMedia>Views>Shared>_partialSocialMedia.cshtml
.