作者在 2006-08-23 00:28:00 发布以下内容
1) System.Text.StringBuilder sb = new System.Text.StringBuilder();
for (int i = 0; i < this.CheckBoxList1.Items.Count; i++)
{
if (this.CheckBoxList1.Items.Selected)
sb.Append(this.CheckBoxList1.Items.Value + ",");
}
string allSelected = sb.ToString().TrimEnd(",".ToCharArray());
2)string strchklist="";
foreach (ListItem li in CheckBoxList1.Items ) |
{ |
if (li.Selected ) |
{ |
strchklist += li.Text + " " ; |
} |
} |