I have three web projects on Asp.net MVC3:
Portal.Web -> Common controllers and models
Portal.WebsiteCustom -> Custom website 1
Portal.WebsiteCustom2 -> Custom website 2
Both custom sites uses the controllers and models of Portal.Web.
Now i would like to add the common views on this project and set MVC to look on Portal.Web project for common views.
Is this possible?
How i could archieve this?
Thanks.
You could write your own view engine that implements
IViewEngine, it has a method that looks for where to search views. You could also extend theVirtualPathProviderViewEngineand override the locations to add custom file locations to find views.Sample code for such a thing is located in this Stack Overflow answer.