初始化CheckBoxList中哪些是选中了的

2024-12-22 12:20:17
推荐回答(1个)
回答1:

1 ///

2 /// 3 /// CheckBoxList 4 /// 5 /// 6 public static string SetCheckBoxList(CheckBoxList checkList,string selval,string separator)7 {8 selval = separator + selval + separator; 16 selval = selval.Replace(val,separator); //然后从原来的值串中删除已经选中了的17 if(selval == separator) //selval的最后一项也被选中的话,此时经过Replace后,只会剩下一个分隔符18 {