C# 中 CheckBoxList 如何判断它被选中
来源:百度知道 编辑:UC知道 时间:2024/06/02 21:20:37
并它的值输出来
string selectedItemText=string.Empty;
CheckBoxList cbx = new CheckBoxList();
foreach (ListItem li in cbx.Items)
{
if (li.Selected)
{
selectedItemText += li.Text;
}
}
多看看里面的属性就知道了
属性里有个selectindex。
看一下属性就知道了呀
if(CheckBoxList1.checked == true)
{
......
}