Repeater里面加上if判断

//创建时绑定
        protected void ItemCreated(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.DataItem != null)
            {
                if (((Active_LotteryResult)e.Item.DataItem).Status == 1)
                {
                    e.Item.FindControl("lbnDelete").Visible = false;
                }
                else
                {
                    e.Item.FindControl("lbnDelete").Visible = true;
                }
            }
        }

 

posted @ 2014-11-19 13:37  递龟  阅读(355)  评论(0编辑  收藏  举报