Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting page object reference at the Global.asax level
Message
From
07/07/2006 15:49:22
 
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
VB 8.0
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01123781
Message ID:
01134565
Views:
27
>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;
>
> }

In regards to this, I believe the PreRequestHandlerExecute() event does not fire on a redirect. If a page, during a postback, is redirecting to another page, this event will fire on the page doing the postback but not on the redirected page. So, I end up in the situation that oPage is not initialized for the redirected page. The redirected page appears ok however. But, the oPage reference still points to the page that did the postback because this event does not fire on a redirect.

What do you recommend as far as adjustments go? Is the application factory class the only way to achieve that?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform