Howdy,<BR>I&#039;m trying to create a base class for my user Controls, and in it I would like to override the Page_Init() event, so that I can dynamically assign some values to some variables. The code I&#039;m using looks like this:<BR><BR>---<BR>public ControlBase(){<BR> base.Page.Init += new System.EventHandler(Page_Init); <BR>}<BR><BR>private void Page_Init(object sender, EventArgs args) {<BR> // set the style strings<BR> SetStyles();<BR>}<BR>---<BR><BR>This code works fine in a base class that I inherit from Pages, and it works fine. But when I use it for Controls, I get a scary error that looks like this:<BR><BR>---<BR>Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.<BR><BR>Source Error: <BR> <BR>Line 156: public PageStart_ascx() {<BR><BR>Source File: D:ASPNetTemp
ootc15b4df771a00674zxg9d8rv.0.cs Line: 156<BR>---<BR><BR>Any suggestions?<BR><BR>Thanks,<BR>Corey