Skip to main content

LINQ – check for any selected item in CheckBoxList



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);

Comments

Popular posts from this blog