Trying to assign values from a dataset to a checkbox list control. I create the dataset (ds), fill it, then use the following line of code in a loop:
This code populates the CheckBox List with the correct items. However, I want to associate a selected value (integer) with the item (string). the value is at ds.Tables(0).Rows(X).Item(2)) so, for example, one option has selectedItem of Pencil, while the selectedValue of pencil is 2. The one line of code, as written, fills the Value and Item properties with the same data.