Posted on: 6/13/2013 4:33:51 AM | Views : 374

I'm currently using a for loop to check each item in a checkboxlist against a list of bit fields in a database.  The database values are being stored in a datatable.  There are quite a few items in the checkboxlist and I would like to elminate much of the code using linq.  The current logic is listed below.  Can someone let me if it is possible to select the items in the checkboxlist using linq?
current code
OptionData = OptionDataTable.Rows(0) For Each li As ListItem In Me.cbloptions.Items If li.Text = "One" Then If Not OptionData.IsOneNull Then If OptionData.One = True Then li.Selected = True End If End If End If If li.Text = "Two" Then If Not OptionData.IsTwoNull Then ...

Go to the complete details ...