Search code examples
asp.nethttphandlerhttpmodule

Render a page inside of an HttpModule?


Anyone got an idea of how to render an aspx page inside of an HttpModule and stream it back to the browser?


Solution

  • You can do something like this:

    Type page_type = BuildManager.GetCompiledType ("~/page.aspx");
    Page page = (Page) Activator.CreateInstance (page_type);
    page.ProcessRequest (Context);