I have a custom control that creates a textbox on CreateChildControls.
I’m trying to set the value of this textbox (trough a property of the control) on the load event of the page that uses the custom control. Unfortunately at this point CreateChildControls haven’t been executed yet and the textbox is null.
I called EnsureChildControls on the consumer page before using the custom control properties but no luck, still null.
This happens when is not postback.
You need to call EnsureChildControls from within the property getter of your custom control to ensure it’s built before accessing a nested control. If that doesn’t help post some code so we can see what you are doing.