你那11和6是什么呀?我的那个是不确定的,我只不过打了个比方
string[] temp ={ "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25"};
for (int i = 0; i < temp.Length; i++)
{
for (int y = 0; y < CheckBoxList1.Items.Count;y++ )
{
if (CheckBoxList1.Items[y].Text.Equals(temp[i]))
{
CheckBoxList1.Items[y].Selected = true;
}
}
for (int y = 0; y < CheckBoxList2.Items.Count; y++)
{
if (CheckBoxList2.Items[y].Text.Equals(temp[i]))
{
CheckBoxList2.Items[y].Selected = true;
}
}
for (int y = 0; y < CheckBoxList3.Items.Count; y++)
{
if (CheckBoxList3.Items[y].Text.Equals(temp[i]))
{
CheckBoxList3.Items[y].Selected = true;
}
}
for (int y = 0; y < CheckBoxList4.Items.Count; y++)
{
if (CheckBoxList4.Items[y].Text.Equals(temp[i]))
{
CheckBoxList4.Items[y].Selected = true;
}
}
for (int y = 0; y < CheckBoxList5.Items.Count; y++)
{
if (CheckBoxList5.Items[y].Text.Equals(temp[i]))
{
CheckBoxList5.Items[y].Selected = true;
}
}
}