日期:2014-05-18  浏览次数:20496 次

求救 关于CheckBoxList获取值的问题?
for(int   nA   =   0;   nA   <   CheckBoxList1.Items.Count;   nA   ++)
                {
                        if(CheckBoxList1.Items[nA].Selected   ==   true)
                        {
                                lia.Demand   =   CheckBoxList1.Items[nA].Text;
                        }
                }

这个取值的方法对吗?为什么我只能获取CheckBoxList中的一个值?
大侠们请帮帮小弟

------解决方案--------------------
for(int nA = 0; nA < CheckBoxList1.Items.Count; nA ++)
{
if(CheckBoxList1.Items[nA].Selected == true)
{
lia.Demand += CheckBoxList1.Items[nA].Text;
}
}