asp.net 中如何获取CheckBoxList的值
string item = string.Empty;
if (CheckBoxList1.SelectedIndex == -1)
{
Alert("请选择");
return;
}
else
{
foreach (ListItem li in CheckBoxList1.Items)
{
if (li.Selected)
{
item += li.Value.ToString() + ",";
}
}
Selected = Selected.Substring(0, Selected.Length - 1);
}
本文转自程序猿博客51CTO博客,原文链接http://blog.51cto.com/haihuiwei/1637676如需转载请自行联系原作者
365850153