Repeater控件的itemDataBound事件与寻找控件

来源:互联网 发布:钢笔字帖推荐 知乎 编辑:程序博客网 时间:2024/06/05 19:15
   //protected void lstArticle_ItemDataBound(object sender, DataListItemEventArgs e)
        
//{
        
//    if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
        
//    {
        
//        DataRowView drv = e.Item.DataItem as DataRowView;
        
//        string downName = drv["downName"].ToString();
        
//        if (downName == null || downName == String.Empty)
        
//            ((Panel)(e.Item.FindControl("Panel1"))).Visible = false;
        
//    }
        
//}

        
//foreach (RepeaterItem item in this.rpFriendList.Items)
        
//    {
        
//        CheckBox check = (CheckBox)item.FindControl("chkSelect");
        
//        if (check.Checked == true)
        
//        {
        
//            Label lblTitle = (Label)item.FindControl("lblFriendID");
        
//            strFriendID = strFriendID + lblTitle.Text + ",";
        
//        }
        
//    }
 
原创粉丝点击