I have a MVC3 Application and I have few of my views content saved in database as string. Now I need to create a virtual view and return this to the client. I read that this can be done by VirtualPathProvider. But wanted to know whether this can be done by RazorViewEngine or not.
EDIT1: I have used a VPP as suggested in this link http://blog.rocketbase.co.uk/2011/04/asp-net-mvc-virtual-path-provider/ . And I registered it in the global.asax file. I have a pretty big web app which has many views which are physically present in the project too. So after registering the VPP in global.asax I find that
- every request in the web app goes via this VPP. Be it for physical or dynamic view. So isn't there be a performance hit for this? And cant we control this call to the VPP by tracking the URL?
- Also I have only .cshtml files in my project, but mvc tries to find .ascx, .aspx, .vbhtml etc etc files. Which again I feel will have a negative impact on the performance.