.net 获取checkBoxList 选中的值

public string GetCheckBoxListValues(ListControl lc)
        {
            string tempValues = "";
            foreach (ListItem li in lc.Items)
            {
                if (li.Selected)
                    tempValues += li.Value+",";
            }
           tempValues = tempValues.Trim(',');
           return tempValues;
        }

posted on 2010-08-12 11:20  bestsaler  阅读(339)  评论(0编辑  收藏  举报