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";
            }
        }
 posted on 2010-07-10 13:34  ddxgc  阅读(126)  评论(0编辑  收藏  举报