how to get selected items count in asp:checkboxlist

前端 未结 4 1533
离开以前
离开以前 2021-02-15 18:01

i have a checkboxlist control

 
 

4条回答
  •  梦谈多话
    2021-02-15 18:23

    Using Linq

     var count=  chkmenuitemdef.Items.Cast().Where(c => c.Selected).Count();
    

提交回复
热议问题