Hi,
Assuming the code below:
public class DynamicAspxHandler : IHttpHandler {
bool IHttpHandler.IsReusable { get { return false; } }
void IHttpHandler.ProcessRequest(HttpContext httpContext) {
string aspxContent = PlainASPXContent();
Page page = CreatePage(httpContext, aspxContent);
page.ProcessRequest(httpContext);
}
Page CreatePage(HttpContext context, string aspxContent) {
// How to implement this?
}
}
how can I implement CreatePage method to instantiate a page based on the plain string content of ASPX?
The note is that the ASPX string itself can containt reference to already existing MasterPage on the disk.
I realise there must be huge performance issue with this but at this stage I just want to know how I can do that. Obviously I will have to cache the result.
Thanks.