P
Paul
I have a Panel.
Inside of Page_Load, I loop 5 times.
In each loop, I programatically create a usercontrol with LoadControl.
In each loop, I add the UserControl to the Panel.
In each loop, I set the UserControl ID to be unique.
Problem: Only the last UserControl is displayed.
Something like this code:
dim uc as UserControl
dim ind as integer
dim pnl as Panel
For Each DB.DataRow In DB.DataTable.Rows
uc = new UserControl
uc = DirectCast(LoadControl("uc_gv_splits.ascx"), UserControl)
ind = ind + 1
uc.ID = "uc_" & ind
pnl.controls.add(uc)
Next
TIA
Inside of Page_Load, I loop 5 times.
In each loop, I programatically create a usercontrol with LoadControl.
In each loop, I add the UserControl to the Panel.
In each loop, I set the UserControl ID to be unique.
Problem: Only the last UserControl is displayed.
Something like this code:
dim uc as UserControl
dim ind as integer
dim pnl as Panel
For Each DB.DataRow In DB.DataTable.Rows
uc = new UserControl
uc = DirectCast(LoadControl("uc_gv_splits.ascx"), UserControl)
ind = ind + 1
uc.ID = "uc_" & ind
pnl.controls.add(uc)
Next
TIA