I have a Repeater item in which their is a tr elements like this. I want to set css class according to item index as alternating item.
My Design Code is Like This
<ItemTemplate>
<tr id='<%# Eval("RegNum").ToString()%>' class='<%# Eval("RowClass").ToString()%>'>
Item Data Bound like this but not working: ( Its Wrong )
if (e.Item.ItemType == ListItemType.AlternatingItem)
{
DataBinder.Eval("RowClass", "bgBlack");
}
else
{
DataBinder.Eval("RowClass", "bgWhite");
}
where bgWhite and bgBlack are css class.
Suggest Me how to achieve this.