using System;
using System.Web.UI.WebControls;

public partial class CheckBoxList_ArrayItems : System.Web.UI.Page
{
   protected void cblItems_Init(object sender, EventArgs e)
   {
      // Tworzenie tablicy elementów do dodania.
      string[] Categories = { "Fantastyka", "Powieści", "Komputery", "Historia", "Religia" };
      foreach (string category in Categories)
      {
          cblItems.Items.Add(new ListItem(category));
      }
   }
}
