Software Programming posted on January 24, 2010 13:03

In your code you often have need of getting the current Page. You can HttpContext to get the current Page, like this.
Page page = (Pape)HttpContext.Current.Handler;
The problem with this is the Handler may be something else.
Instead, you should pass the Page into your class or method, like this.
public static void Method(Page page)
By Andrew Weitzen, Bronze Inc. (c) 2010
Bronze is the publisher of several online Internet journals including: InternetHandholding.com, DomainNames.gs, DotNetNuke.bz, Programmer.bz, Software.vg, WebHosting.vg