You can create a base class in your application that inherits from System.Web.UI.Page.
Let all your pages inherit from the newly created base class. Add a property or a variable to your base class with propected access modifier, so that it will be accessed from all your pages in the application.