>Is there a way to get a page object reference at teh Global.asax level? Presently, I have this in the Application_BeginRequest():
Not that way now.
What do you want to do exactly? If you want to not really use ASPX style pages create an HTTP Handler which will give you all the information you need with out the Page framework.
As to hooking in like you're trying to do: The page doesn't get created until much much later in the cycle during Handler execution. You can't do this sort of thing easily in Global nor do I think that's the right place. I think what you'll want is create a special HttpHandlerFactory that extends the standard ASP.NET Page handler factory and allows for the set up you need.
Alternately you can try this (inside of global.asax) to get a reference to your page in the HttpApplication pipeline:
public Global()
{
this.PreRequestHandlerExecute += new EventHandler(Global_PreRequestHandlerExecute);
}
void Global_PreRequestHandlerExecute(object sender, EventArgs e)
{
System.Web.UI.Page pag = this.Context.Handler as System.Web.UI.Page;
}
+++ Rick ---
>
>
> Sub Application_BeginRequest(ByVal sender As Object, ByVal e As EventArgs)
> LXFramework.oRequest = Request
> LXFramework.oResponse = Response
> LXFramework.oServer = Server
> LXFramework.BeginRequest()
> End Sub
>
>
>LXFramework contains a property oPage for the page object. So far, I was passing this object from the code behind of the page. I would like to avoid doing that in all pages. Is there a way to get a reference to the page object at this level?