Reputation: 51
I would like to be able to drop in Razor based "Theme" _Layout.cshtml files at runtime in my current project, however I cannot find a way to tell the project not to pre-compile these files AND allow new files to be added (or existing files updated).
I have found, through the project settings to tell the project NOT to precompile views on Publish, which requires me to add the .cshtml files into the published package, but if they are updated at runtime, it requires a restart of the app for the changes to be noticed.
Is this possible ?
Upvotes: 1
Views: 415
Reputation: 109
On the top of your .chtml page you will find that @layout =your layout page name. Just remove the name and put null instead of that.
Upvotes: 1