Using custom VirtualPathProvider to load embedded resource Partial Views

Because now you are serving your views from some unknown location there is no longer the ~/Views/web.config file which applies and indicates the base class for your razor views (<pages pageBaseType=”System.Web.Mvc.WebViewPage”>). So you could add an @inherits directive at the top of each embedded view to indicate the base class. @inherits System.Web.Mvc.WebViewPage @model …

Using VirtualPathProvider to load ASP.NET MVC views from DLLs

You must register your VirtualPathProvider within the Global.asax Application_Start handler. You must call the view in your DLL using the special path like so: return View(“~/Plugin/YOURDLL.dll/FULLNAME_YOUR_VIEW.aspx”); Here’s an article with downloadable code sample that demonstrates this: http://www.wynia.org/wordpress/2008/12/aspnet-mvc-plugins/

tech