Reputation: 9395
I am wanting to use a view across multiple areas. I have put the partial view in question into the main application Views/Shared folder, but I cannot seem to access this.
Does anyone know how to access the shared view folder?
The code i am currently using is the basic:
@Html.RenderPartial("MyPartialControl")
Upvotes: 1
Views: 7347
Reputation: 21
Just in case, if you have not found the solution yet (I doubt)... try this, it worked for me.
@Html.RenderPartial("~\\Views\\Shared\\MyPartialControl.cshtml")
for C# and single '\' for VB.NET
Upvotes: 2
Reputation: 46008
Have you tried using full path?
@Html.RenderPartial("~/Views/Shared/MyPartialControl.cshtml")
Upvotes: 9