Try replacing
string str = "";
if (Checkedlistbox1.CheckedItems.Count > 0)
{
for (int i = 0; i < Checkedlistbox1.CheckedItems.Count; i++)
{
str += Checkedlistbox1.CheckedItems[i].ToString();
}
By
List<ListItem> selected = CheckBoxList1.Items.Cast<ListItem>()
.Where(li => li.Selected)
.ToList();
string str = selected.Select(p => p.Value).ToArray().Aggregate((current, next) => current + ", " + next);