You have to iterate through each item in the datalist find the checkbox
control and check if it is selected. assuming your datalist's id is dl and
the checkbox id is controlsid
Dim alSelectedValues As New ArrayList
For Each item As DataListItem In dl.Items
'check the item isn't a header or footer
If item.itemindex > -1 Then
Dim cb As CheckBox = item.FindControl("controlsid")
Dim value As String = cb.Text
Dim checked As Boolean = cb.Checked
If checked Then
alSelectedValues.Add(value)
End If
End If
Next
good luck jd
"Paperback Writer" wrote:
I have a DataList with a lot of items where the user can select them trough
the CheckBoxes but i don't have idea how to capture these values from the
checkboxes to insert in my DataBase....How to accomplish that ?
--
Please, check my theSpoke:
http://www.thespoke.net/MyBlog/dgroh/MyBlog.aspx