LINQ – check for any selected item in CheckBoxList

1:46:00 AM 0 Comments A+ a-



Here is an example on how to check if ASP.NET CheckBoxList has any item selected using LINQ:


 bool isAnyItemSelected = cblCheckBoxList.Items.Cast<ListItem>().Any(x=>x.Selected == true);