I have two CheckBoxList controls (chkListVideoMedia and chkListAudioMedia) on my page that I want to capture information from and insert the records into the database. I have it working for one of the controls, I just need help modifying my code below to include the second CBL
Dim values As New ArrayList()
For counter As Integer = 0 To chkListVideoMedia.Items.Count - 1
If chkListVideoMedia.Items(counter).Selected Then
MyTextBox.Text = chkListVideoMedia.Items(counter).Value
values.Add(newId)
End If
Next
If values.Count > 0 Then
For item As Integer = 0 To values.Count - 1
If item = 0 Then
MyMedia1.Text = values(item).ToString
End If
If item = 1 Then
MyMedia2.Text = values(item).ToString
End If
If item = 2 Then
MyMedia3.Text = values(item).ToString
End If
If item = 3 Then
MyMedia4.Text = values(item).ToString
End If
Next
End If
Thanks, James