Page event is not getting fired at all Page event is not getting fired at all asp.net asp.net

Page event is not getting fired at all


LoadComplete is not automatically wired up.. You'll have to do that yourself.

    protected void Page_Load(object sender, EventArgs e)    {        Page.LoadComplete += new EventHandler(Page_LoadComplete);    }    void Page_LoadComplete(object sender, EventArgs e)    {        //Do your deed    }

Reference: http://connect.microsoft.com/VisualStudio/feedback/details/103322/page-loadcomplete-doesnt-fire-in-custom-controls


The LoadComplete event only happens on the Page. For a control, if you want to do something after the other controls' Load events have fired, about the closest you'll get is PreRender.

Alternatively, you could attach to the Page's LoadComplete event in your control's init stuff. But AFAIK it won't happen automatically.