Hi
I am trying to get the Index of an Item checked in a dynamically added CheckBoxList. I use the following code and
myCheckBoxListName and myNewValue work just fine but oIndex returns -1 every time
Private Sub HandleCheckBoxListOnSelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs)
Dim myCheckBoxListName As String
Dim myNewValue As String
Dim oIndex As Integer
myNewValue = DirectCast(sender, CheckBoxList).SelectedValue
oIndex = DirectCast(sender, CheckBoxList).SelectedIndex
myCheckBoxListName = DirectCast(sender, CheckBoxList).ID
End Sub