Hi, Support
i have a dynamically added repeater to asp Panel control (see the code below)
This is working good, repeater is added to asp Panel. But, when I try to retrieve repeater items, it appears that panel doesn't contain any control.
I am sure that I don't clear panel controls in the code.
What can be the reason of this strange behavior? Thanks in advance!
i have a dynamically added repeater to asp Panel control (see the code below)
DataRepeater.ID = String.Format(
"DR{0}"
, ItemID);
DataRepeater.DataSource = oToDoList;
DataRepeater.DataBind();
foreach
(RepeaterItem RItem
in
DataRepeater.Items)
{ ... }
pnlNiches.Controls.Add(DataRepeater);
This is working good, repeater is added to asp Panel. But, when I try to retrieve repeater items, it appears that panel doesn't contain any control.
Repeater DataRepeater = (Repeater)pnlNiches.FindControl(String.Format(
"DR{0}"
, ItemID));
if
(DataRepeater !=
null
)
{
foreach
(RepeaterItem RItem
in
DataRepeater.Items)
{ ... }
}
I am sure that I don't clear panel controls in the code.
What can be the reason of this strange behavior? Thanks in advance!