hi am using an application with visual stuio 2010 vb.net and sql server 2008.am having a Checkbox list in my page and i need to loop through the checkbox list and to store the Datavaluefield of ach checked checkbox in the checkbox list.
Here is my code.
StrSql = "SELECT Id, District_Name FROM tbl_TrainingCentre_Detail WHERE MasterId =230 ORDER BY District_Name ASC "
Chkboxlist.DataSource = dbHandler.fnDataSet(StrSql)
Chkboxlist.DataValueField = "Id"
Chkboxlist.DataTextField = "District_Name "
Chkboxlist.DataBind()
For Each Cbdist As CheckBox In Chkboxlist.Items
If Cbdist.Checked = True Then
End If
Next