In our ASP.NET application we allow other developers to write asp.net code and we compile their code into in-memory dll.
As part of this we would like to be able to compile ASCX controls into DLL at runtime and then later on load them into Aspx Pages.
I already know how to load the Ascx control from a path (which does not work in my case, most likely the ascx file content will be in DB) and as long as I have the Control object i can add it to the Page control hierarchy.
So the key for me is how to compile the ascx files produced at runtime into a DLL (in-momery) so then when they are requested I would be able to add them to the Aspx pages.
Any suggestions?