Overriding PreInit()

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ThomasEmpl
    New Member
    • May 2008
    • 1

    Overriding PreInit()

    Hello,

    I have a Webcustom Control and am trying to override the PreInit function ...

    public MyControl()
    {
    this.Page.PreIn it += new EventHandler(Pa ge_PreInit);
    }

    void Page_PreInit(ob ject sender, EventArgs e)
    {

    }


    This throws an null reference error...
    I can understand why, but where can I add my own handler for this event?
    As I understand PreInit is the first event that fires.

    Thomas
Working...