repeater中如何判断checkbox是否被选中并取出选中行的数据?

2024-11-20 04:29:46
推荐回答(1个)
回答1:

repeater进行循环判断
foreach(RepeaterItem ri in Repeater1.Items)
{
CheckBox cb=ri.FindControl("chkChoose") as CheckBox;
if(cb!=null)
{
if(cb.Checked)
return cb.value;
}
}