protected void SetDivs(object sender, RepeaterItemEventArgs e)
{
if(e.Item.ItemIndex == 0 || e.Item.ItemIndex % 5)
{
Literal ltrlOpen = (Literal)e.Item.FindControl("ltrlOpen");
ltrlOpen.Visible = true;
}
else if(e.Item.ItemIndex % 4 || e.Item.ItemIndex + 1 == Repeater1.Items.Count)
{
Literal ltrlClose = (Literal)e.Item.FindControl("ltrlClose");
ltrlClose.Visible = true;
}
}
|