Repeater有个CheckBoxList控件for(Repeater第一个Item的CheckBoxList)
{
for(Repeater第二个Item的CheckBoxList)
{
for(Repeater第三个Item的CheckBoxList)
{
..........
for(Repeater最后一个Item的CheckBoxList)
每一项的CheckBoxList要嵌套在前一项的CheckBoxList里面
{
for(Repeater第二个Item的CheckBoxList)
{
for(Repeater第三个Item的CheckBoxList)
{
..........
for(Repeater最后一个Item的CheckBoxList)
每一项的CheckBoxList要嵌套在前一项的CheckBoxList里面
{
CheckBoxList CHB = (CheckBoxList)Item.FindControl("CheckBoxList1");
}
{
CheckBoxList chk=item.FindControl("") as CehckBoxList;
foreach(ListItem i in chk.items){}
}
string str ="";
void(n)
{
CheckBoxList cbl = (CheckBoxList)this.Repeater1.Items[n].FindControl("CheckBoxListValue");
if(n==this.Repeat1.Item.Count-1)
{
foreach(ListItem item1 in cbl.Item)
{
if(item1.Checked)
{
Add(str+item1.text); //一行
}
}
}
else
{
foreach(ListItem item in cb.Item)
{
str+= item.text+",";
void(n+1)
}
}琢磨出来了.......