for (int i = 0; i < DataList1.Items.Count; i++)
{
int row =i ; //i / 2 2为每行显示的列数
if (row % 2 == 0)
{
DataList1.Items[i].CssClass = "testf";
}
else
{
DataList1.Items[i].CssClass = "tests";
}
}
{
int row =i ; //i / 2 2为每行显示的列数
if (row % 2 == 0)
{
DataList1.Items[i].CssClass = "testf";
}
else
{
DataList1.Items[i].CssClass = "tests";
}
}