virtual view inheriting from System.Web.Mvc.ViewSt

2019-07-31 13:57发布

问题:

I had an issue with when trying to retrieve virtual views from a file by means of VirtualPathProvider, which is described in this stackoverflow thread.

Now my question is why does a virtual view inherits from System.Web.Mvc.ViewStartPage, and how to make it to inherit from WebViewPage so that I can use

ViewResult View(string viewName);

instead of

PartialViewResult PartialView(string viewName);

like in described workaround?