I have an ASP.NET web form control, let it control A, which contains the child control that I will select for control B. The child controls of control B depend on the property of control A.
On boot, I set this parameter to OnLoad of control A, and everything works fine when control B correctly configures child controls in CreateChildControls.
However, when I want to change this parameter using SelectedIndexChanged in the A control drop-down list, the event handler seems to process the life cycle for B control too late to get the changed value. Presumably this is because the CreateChildControls B control method has already been called.
How can I get control B to update its child controls so that they can go through their normal life cycle, loading the viewport if necessary?
Just for clarity, when the control parameter A changes, the child controls of B may have some that remain, some that need to be removed, and some that need to be added, therefore, for those that remain, state still needs to be loaded.
source
share