You can iterate through on server side on your controls and check if the actual checkbox checked or not.
List<string> yourIds = new List<string>();
CheckBox cb;
foreach (object actualObject in Controls)
{
if (actualObject.GetType() == typeof(CheckBox))
{
cb = actualObject as CheckBox;
if (cb.Checked)
yourIds.Add(cb.ID);
}
}
You can do this on client side as well.