I am exploring possible implementation of roslyn framework as a dynamic code generator for asp.net . So far, it looks amazing. At the moment I am stuck at generating code behind implementation for asp.net page (web application). I have managed to create an assembly, which contains both page.design.cs and page.aspx.cs code, but I do not know how to link the result to the existing .aspx page (this scenario worked well when I set the code behind in (one) separate class within my project, and in Inherit attribute I set the namespace.class_name to it). I have changed the Inhertit attribute to point to class, which is the result of the roslyn code generation. However, this does not seem to work, since (I guess) the .aspx page is expecting code behind instance to be available at compile time, but I am trying to supply this definition at runtime.
Is there any way I can trick the .aspx to think that it has code behind definition, which I can supply at runtime, and how can I link my custom code behind class with .aspx page?
Best regards.
After doing a small research on similar possibilities in ASP.NET, it seems that it is much easier to perform this task with MVC controllers and views, rather than messing with code behind classes of plain ASP.NET. Here is an interesting link on this subject, which turns out to be an answer to my question. If someone has an suggestion regarding ASP.NET, I will be more than happy to hear it.