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; } } }