I\'m using repeater to create dynamic ul li list
Is it possible to control class whether item is first or last?
Something like:
class=\"<%
If your are using controls within your ItemTemplate you can do something like the following, add OnItemDataBound event.
<%#Eval("Content") %>
protected void OnItemDataBound(object sender, RepeaterItemEventArgs e)
{
if (e.Item.ItemIndex == 0)
((Panel) e.Item.FindControl("PnlCtrlItem")).CssClass = "first";
//or the following to have your control indexed
((Panel) e.Item.FindControl("PnlCtrlItem")).CssClass = string.Format("item-{0}",e.Item.ItemIndex);
}