Hi
I want to render a page in memory. That is (pseudo-code):
Page aPage = new Page();
LiteralControl lc =
new LiteralControl("<form runat=server><asp:Label id=label
Runat=server/>...");
aPage.Control.Add(lc)
aPage.RenderControl(htmlWriter);
Unfortunately, this does not work, as the page does not go through its
lifecycle (Init, Load...). So it does not know about inner controls. In fact
RenderControl does work, but the result is the text I provided to
LiteralControl because no control is instantiated - this is just a plain
text for server.
What I actually want to do is to load page template from database and render
it.
Is there a way to "run" the page in such a way as IIS does? Or: is there a
way to force Page instance to go through lifecycle?
Regards.