对于每个循环到复选框列表 [英] For each loop to checkbox list
本文介绍了对于每个循环到复选框列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在C#中将每个循环应用到复选框列表中
请给我一些解决方案
how to apply for each loop to checkbox list in C#
please provide me some solution
推荐答案
尝试:
Try:
foreach (object o in myCheckedListBox.Items)
{
...
}
use < br $>
use
List<ListItem> selected = new List<ListItem>();
foreach (ListItem item in CBLGold.Items)
if (item.Selected) selected.Add(item);
foreach (ListItem li in CheckBoxList1.Items) {
if (li.Selected == true) {
Label1.Text += li + " ";
}
}
这篇关于对于每个循环到复选框列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文