点击按钮 修改repeater控件中某一子控件的状态enable=true

2024-12-22 22:18:26
推荐回答(1个)
回答1:

protected void Repeater1_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType==ListItemType.AlternatingItem)
{
Label Label_hidden = (Label)e.Item.FindControl("Label_hidden");
Label_hidden.enable=true;
// Label 可以换成任意控件
}

}