There are many examples out there which show how to store and retrieve virtual views from a file or database, but none of them show how to configure root web.config so that the application works properly, when a view's content retrieved from a file and contains for instance @ViewBag.Title = "Some Title"
line.
In this case I get CS0103: The name 'ViewBag' does not exist in the current context error, just like in cases when I remove web.config from ~/Views project folder.
So, what config elements from the ~/Views/web.config to root web.config in order to fix the mentioned above error?
Is it possible to load config elements into assemby at run time?