在DataList的ItemTemplate项中增加数据分隔行效果,但首行需特殊处理。见如下样例
<tr style='<%# (System.Convert.ToInt32(Container.ItemIndex)>0)? "DISPLAY: block":"DISPLAY: none" %>'> <td colSpan="4" height="1"> <hr color="#a9a9a9" style="border-style: dotted; border- 1px" size="1"> </td> </tr>