日期:2014-05-18 浏览次数:20534 次
protected void DataList1_ItemDataBound(object sender, DataListItemEventArgs e) { if (e.Item.ItemType == ListItemType.Footer) { if (e.Item.FindControl("Label1") != null) { Label lbl = (Label)e.Item.FindControl("Label1"); } } }
------解决方案--------------------
protected void DataList1_ItemDataBound(object sender, DataListItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.Footer)
{
if (e.Item.FindControl("Label1") != null)
{
Label lbl = (Label)e.Item.FindControl("Label1");
}
}
}