int index = 0;
It explains your issue.
I also feel like you got the ItemDataBound event all wrong.
protected void Repeater2_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
if (e.Item.ItemType != ListItemType.Item
&& e.Item.ItemType != ListItemType.AlternatingItem)
{
return;
}
UserControl u = (UserControl)e.item.FindControl("SubChemicals1");
if (u != null)
{
DropDownList d = (DropDownList)u.FindControl("ddlchemicals");
d.DataTextField = "CName";
d.DataValueField = "RecID";
d.DataSource = bl.Fill_DDL("Sp_GetSubChemicals");
d.DataBind();
d.Items.Insert(0, new ListItem("---Select---", "0"));
}
}