List<string> list = new List<string>();
for (int k = 0; k < RepeaterList.Items.Count; k++)
{
//根据控件id获得控件对象,ckSelect是checkBox控件的id
CheckBox chksel = (CheckBox)RepeaterList.Items[k].FindControl("ckSelect");
if (chksel != null)
{
if (chksel.Checked)
{
//获取id记录,cb.ToolTip里存放的就是记录id
string controlName = chksel.ID; //控件名称
string id = chksel.ToolTip; //绑定数据ID值
list.Add(id);
}
}
}