I am trying to make an object visible that is in the footer of my DataList.
I don't want to use the ItemDataBound event to do this but want to do something like:
The problem is that it only shows me the Item and Alternating Item. It does not get to a Header of Footer item. It does find them during the ItemDataBound.
Why doesn't going through the Items of the DataList find them?
Thanks,
Tom
I don't want to use the ItemDataBound event to do this but want to do something like:
Code:
foreach (DataListItem dli in DataList1.Items)
{
switch (dli.ItemType)
{
case ListItemType.Footer:
break;
case ListItemType.Item:
break;
case ListItemType.AlternatingItem:
break;
case ListItemType.Header:
break;
}
}
The problem is that it only shows me the Item and Alternating Item. It does not get to a Header of Footer item. It does find them during the ItemDataBound.
Why doesn't going through the Items of the DataList find them?
Thanks,
Tom