Repeater使用二

if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                    string id = ((DataRowView)e.Item.DataItem)["ID"].ToString();
                           }

 

 

 

 ((DataRowView)e.Item.DataItem)只在itemcreate和itemdatabind事件中不为null

 

找到HeaderTemplate里的控件:

this.rptBook.Controls[0].FindControl("ckbCheckAll")

posted @ 2011-10-10 21:47    阅读(213)  评论(0编辑  收藏  举报