Repeater隔行变色简易实现

<table>
    
<tr>
        
<td>用户编号</td>
    
</tr>
    
<asp:Repeater ID="rptUser" runat="server">
    
<ItemTemplate>
    
<tr style='background-color:<%#(Container.ItemIndex%2==0)?"red":"green"%>'>
        
<td><%#Eval("UID")%></td>
    
</tr>
    
</ItemTemplate>
    
</asp:Repeater>
</table> 
原文地址:https://www.cnblogs.com/pipizhu/p/1624533.html