accessing Page from Global function RRS feed

  • Question

  • User-942143836 posted
    Hi, Hopefully there is a simple answer to my question. I've already looked through .net framework and googled but I think I'm just missing it. On this method in the global.asax: protected void Application_AuthenticateRequest(Object sender, EventArgs e) I thought it would be easy to do this: System.Web.UI.Page pg = (System.Web.UI.Page)sender; My logic apparently is off because that doesn't work. I want to access the Page attributes of the calling aspx file from the global methods. It seems simple enough. Help would be appreciated. Thanks
    Tuesday, March 1, 2005 5:41 PM

All replies

  • User-942143836 posted
    Is this just a totally stupid question? I want to maintain page id's but not through the query string. I'm thinking of using the url to retrieve a pageid from the database but I keep seeing the Page.ID property and I want to use it for something. Help appreciated!
    Thursday, March 3, 2005 5:36 PM
  • User-942143836 posted
    Maybe I will just use a session variable instead. Probably make more sense. I would still appreciate feedback though.
    Thursday, March 3, 2005 5:49 PM
  • User371668647 posted
    You can store that kind of information in the Context.Items collection. I don't think the Page class actually exists at that point in the Request processing cycle.
    Saturday, March 19, 2005 11:12 PM