I have a detailsview with a checkboxlist
<asp:TemplateField HeaderText="test5">
<ItemTemplate>
<asp:CheckBoxList ID="cbl_test5_2_3" runat="server" OnLoad='PopulateCbl'>
</asp:CheckBoxList>
</ItemTemplate>
</asp:TemplateField>
As you can see, it is populated by a method. This method checks whether the item is checked or not (when updating the data shown in the detailsview)
Protected Sub PopulateCbl(ByVal sender As Object, ByVal e As System.EventArgs)
Dim cbl As CheckBoxList = CType(sender, CheckBoxList)
Dim command As New SqlCommand("select * from dbg_option where veld_id = @veld_id")
command.Parameters.AddWithValue("veld_id", cbl.ID.Split("_")(3))
For Each row As DataRow In Namespace.Da ...
Go to the complete details ...