title: Dynamically Produce Razor Views at Runtime?
body: <p>I am looking at building a web configurable layout engine, and would like to directly use the razor engine under the hood. </p>
  
  <p>Lets say I have some information available via classes, xml, or a database - I want to convert that into native razor code <strong>at runtime</strong> (by this I mean to imply my source of defining content and structure is based on a provider model). Rather than convert an xml file or something on the fly every request I figured I might as well just write Razor, and let that view engine take care of everything.</p>
  
  <p>Can I plug razor code directly into the engine from a source that is not the file system?</p>
  
  <p>Will there be any gotchas if I dynamically generate .cshtml views and layouts into files at run-time [and dynamically set those views in the controller actions]?</p>