C
Chris Ericoli
Hi,
I am wanting to add a usercontrol programatically to a placeholder's control
collection. The placeholder is coded within the ITEMTEMPLATE of a datalist.
The problem that I am facing, is that when I render the page, the
placeholder variable (that I have declared as per the ID of the placeholder
control), is throwing an error of object not set. When I do a watch on the
placeholder variable, it's value is NOTHING, implying that it has not been
tied to the actual control.
I have checked and rechecked to ensure that the variable name is the same as
the control's ID. I have tried creating other controls within the
ITEMTEMPLATE, and the same thing happens - they do not instantiate with the
page's render. I thought that perhaps they only instantiate once the
datalist item object is created, so inspected the state within the
datalist.itemcreated event - same thing.
Am slowly losing hope - any help would be great.
Cheers
Chris
I am wanting to add a usercontrol programatically to a placeholder's control
collection. The placeholder is coded within the ITEMTEMPLATE of a datalist.
The problem that I am facing, is that when I render the page, the
placeholder variable (that I have declared as per the ID of the placeholder
control), is throwing an error of object not set. When I do a watch on the
placeholder variable, it's value is NOTHING, implying that it has not been
tied to the actual control.
I have checked and rechecked to ensure that the variable name is the same as
the control's ID. I have tried creating other controls within the
ITEMTEMPLATE, and the same thing happens - they do not instantiate with the
page's render. I thought that perhaps they only instantiate once the
datalist item object is created, so inspected the state within the
datalist.itemcreated event - same thing.
Am slowly losing hope - any help would be great.
Cheers
Chris