ChildControl childcontrol is null when called from Main control
I have built a webusercontrol in asp.net that contains a dropdown of data. When I directly place this control on the web form, it works well. But if I try to add this control as childcontrol to another control at runtime
Childcontrol childcontrol = new Childcontrol ();
maincontrol.controls.add(childcontrol)
the dropdown child control is not set (equal to null), so I am throwing an exception while trying to bind data to the dropdown.
0
Jan Schoenrock
source
to share