Hi-
I have a page that uses a usercontrol. The usercontrol (1) itself uses a usercontrol (2). This all works fine. The issue is that the user has the ability to dynamically add usercontrol(1) as many as needed. The code to that actually does it is below... what's happening is that it addes the control, but the usercontrol (2) thats included in the usercontrol(1) being added doesn't show.
Could I have used the word user any more?
I hope this isn't too confusing...
Thanks,
Marc
I have a page that uses a usercontrol. The usercontrol (1) itself uses a usercontrol (2). This all works fine. The issue is that the user has the ability to dynamically add usercontrol(1) as many as needed. The code to that actually does it is below... what's happening is that it addes the control, but the usercontrol (2) thats included in the usercontrol(1) being added doesn't show.
Could I have used the word user any more?
Code:
Sub AddRoom_Click(Sender As Object, e As System.EventArgs)
Dim x As Integer
Dim numRooms As Integer
If NumBORooms.Text <> "" Then
numRooms = CInt(NumBORooms.Text)
End If
For x = 1 to numRooms
Dim c1 As System.Web.UI.UserControl
c1 = LoadControl("/bmc/Library/BreakOutRooms.ascx")
c1.ID = "BORooms" & (x+1)
BreakOutRooms.Controls.Add(c1)
Next x
End Sub
I hope this isn't too confusing...
Thanks,
Marc