如何获取按钮上的复选框的所有值单击asp.net

时间:2011-01-18 18:47:56

标签: c#

我有10个使用转发器填充的复选框

我想获取在c#

中的asp.net按钮点击事件中检查的所有复选框值

非常感谢您的帮助

1 个答案:

答案 0 :(得分:0)

puesdo codeish

checkedBoxes为新列表(复选框)

for each item as repeater in repeater.items

 checkbox = (CheckBox)item.findcontrol("checkboxid")

 if checkbox.checked
  checkedBoxes.add(checkbox)
 end if

end for