csharp loop through repeater items

Code Example - csharp loop through repeater items

                
                        foreach (RepeaterItem item in repeater.Items)
{
    if (item.ItemType == ListItemType.Item || item.ItemType == ListItemType.AlternatingItem)
    {
        CheckBox chk = (CheckBox)item.FindControl("ckbActive");

        bool r = chk.Checked;
    }
}