I am having problems finding my UserControls inside the Controls collection of a Placeholder control.
I have a ListView control with a PlaceHolder control in its ItemTemplate. OnItemdataBound for the ListView control I am adding a custom UserControl to the Controls collection of the Placeholder control. It all renders fine. My problem is when I try to find my user controls in the Placeholder. I just can't get it back. My code is below.
My objective here is to get to the input controls within my UserControl and call the save method of this. Please help.
PlaceHolder intakeBenefitHolder = null;
protected void lvIntakeBenefits_ItemDataBound(object sender, ListViewItemEventArgs e)
if (e.Item.ItemType == ListViewItemType.DataItem)
using (ListViewDataItem item = (ListViewDataItem)e.Item)
// cast the ListViewDataItem to a Benefit
Benefit benefit = (Benefit)item.DataItem;
// create the ClientIntakeBenefitDictionary dictionary for the benefit and add it to the BenefitAtIntake control
ClientIntakeBenefitDictionary dictionary = new ClientIntakeBenefitDictionary(benefit, new Guid(this.ContactId));
// Create the IntakeBenefit
View Complete Post