Reputation: 6378
I'm trying to render a partial view from another project.
It's very simple. I've highlighted the string where should be replace for the _View1 since the another one.
What do I need to add to the string to recognize and access to the razor partial view?
Upvotes: 3
Views: 2400
Reputation: 101192
It's not supported in ASP.NET MVC per default.
You have to create a custom VirtualPathProvider
which can locate your views. You also have to use @inherit
instead of @model
.
Or you can use my open source MvcContrib project as I describe here: http://blog.gauffin.org/2012/05/griffin-mvccontrib-the-plugin-system/
(the code is located at github + nuget: https://github.com/jgauffin/griffin.mvccontrib)
Upvotes: 2