I agree with Rex, I am suspicious of the requirement.
That said, I find it cleaner to put it on the HttpContext.Current.Items collection. The page would set the value preferably on its OnInit, using a nice class wrapping around it, to get the info.
If you want you can have the wrapper actually read the current Url, or check the type of the page (which is the usually the current Handler HttpContext.Current.Handler / don't recall if ajax affects that), which can get you a solution that doesn't needs the page to set anything at all.