page_load doesn’t fire

22 Mar 2006


The Page_Load event in one of my pages was not firing – I eventually tracked this down to the InitializeComponent function (inside the “Web Form Designer generated code” block) The following line, which should have been automatically generated, was missing :

this.Load += new System.EventHandler(this.Page_Load);

The trouble is that I tend to stay away from the design view and work almost exclusively in the HTML view. And in making a new page, based on an existing one, this vital line was omitted. Much frustration.