I have a repeater that has an OnItemDataBound event on it. For some reason the repeater has three items being bound to it. But then I try the below it only writes '2' at the top of the page. The repeater itself does show the three items but this loop in the ondatabound event doesnt see the last item. Why?
protected void colourRepeater_ItemBound(object sender, RepeaterItemEventArgs e)
{
int count = 0;
foreach (RepeaterItem item in rptAssoicatedProducts.Items)
{
count++;
}
Response.Write(count.ToString());
}