Assuming the following code:
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 can I implement the CreatePage method to create an instance of a page based on the simple contents of an ASPX string?
It should be noted that the ASPX line itself may contain a link to an existing MasterPage on disk.
I understand that there must be tremendous performance with this problem, but at this point I just want to know how I can do this. Obviously, I have to cache the result.
Thanks.
Dmytrii nagirniak
source share