
Partial Class CheckBoxList_CheckBoxList_ArrayItemsAndValues
    Inherits System.Web.UI.Page

    Protected Sub cblItems_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles cblItems.Init
        'Tworzenie tablicy elementów do dodania.
        Dim Genres() As String = {"Fantastyka", "Powieści", "Komputery", "Historia", "Religia"}
        Dim Code() As String = {"sf", "nvl", "cmp", "his", "rel"}

        For i As Integer = 0 To Genres.Length - 1
            cblItems.Items.Add(New ListItem(Genres(i), Code(i)))
        Next

    End Sub
End Class
