asp.netchildcontrol

Child Control in Asp.net


which is the earliest event when child control exists ?


Solution

  • In page lifecycle you can use OnInit as the earliest event.

    but if you mean the earliest event that you can access the child controls,

    Call EnsureChildControls method at the beginning of the event, then you can access the child controls of the control. If child controls are not initiated, it simply calls the CreateChildControls methods, and initiates them.