Row separator in datalist

寵の児 提交于 2019-12-06 14:56:57

Try this:

<asp:DataList>
    <SeparatorTemplate>
        <hr />
    </SeparatorTemplate>
</asp:DataList>

Update

If you want a simple border this way may help. the only problem is that latest row has a separator too.

<asp:DataList ID="DL1" runat="server" Width="200px" RepeatDirection="Horizontal" RepeatColumns="2" CssClass="DL1" CellPadding="0" CellSpacing="0">
    <ItemTemplate>
    .
    .
    .
    </ItemTemplate>
</asp:DataList>

.DL1 td
{
    border-bottom: solid 1px silver;
    border-collapse: collapse;
}

Use DataList.SeparatorTemplate Property

e.g.

<SeparatorTemplate>

        <asp:Image id="SeparatorImage"
             ImageUrl="SeparatorImage.jpg"
             runat="server"/>

     </SeparatorTemplate>

And look into this DataList.SeparatorTemplate Property

IrishChieftain

Formatting the DataList and Repeater Based Upon Data is explained with examples here,have a look.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!