读书人

求救 关于CheckBoxList获取值的有关问

发布时间: 2012-02-01 16:58:19 作者: rapoo

求救 关于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;
}
}

读书人网 >asp.net

热点推荐