0
Reply

Nested dynamic control...

techiDam

techiDam

Apr 14 2005 2:19 PM
1.7k
hi, The requirement is that I have to create a web user control which contains controls in following order to be displayed in the screen. 1. CheckBox (checkbox1) 2. DropDownList (Dropdown1). This will be shown only when the checkbox1 is checked. 3. Set of CheckBoxes(itemCheckbox) . These will be shown only when the checkbox1 is checked. The number of checkboxes to be created is variable and decided at runtime. The Web User Control can be created, at design time, with the controls (Check box & Drop down list) specified in the points 1 & 2 above. But since the number of itemCheckbox checkboxes is not constant, this cannot be included in the web user control at design time. Can a list of controls (in this case the checkboxes for the items) be added to the web user control at run time? If so, how do we go about doing this? We also need to handle events specific to each of these checkboxes created. Could you please suggest a workable solution and help me out in this regard. Thanks - techiDam