Reputation: 14967
this question is similar to others, but can not find one to solve my problem.
I have several projects, and all used a same view CommonGridView.cshtml
that is called with "Razor.PartialView". I need to create a new project and that all call then view CommonGridView.cshtml
from the new project.
I do not if there is the possibility of adding a directory to which to seek the views, and that this route is another project.
Thank you.
Upvotes: 1
Views: 1179
Reputation: 1038780
If those projects are hosted as separate ASP.NET applications it will be difficult to render a view which is not part of the current application. You may take a look at the following article which illustrates a custom virtual path provider which would allow you to embed a Razor view into an assembly that you could reuse between multiple ASP.NET MVC applications.
Upvotes: 1