不会用 repeater 求一个一行三列 显示 每一行都有分隔线的 例
  img | img | img
  ---------------
  img | img | img谢谢大家

解决方案 »

  1.   

    把Repeater的摸版项放到<td></td>的外面,然后设置显示三个,就可以了。
    但是这样着能显示一行
    如果想显示多行用DataList
      

  2.   

    绑定的时候增加<tr> !设全局变量。当全局变量执行到2的时候增加HTML标签。可以实现你说的效果,绑定的时候从<td>开始就可以了
    //定义全局变量i
    int i=1;
    void Repeater1_ItemDataBound(object src,RepeaterItemEventArgs e){
    if(i%3==0){
    e.Item.Controls.Add(new LiteralControl("</tr><tr>");
    }
    i++;
    }
      

  3.   

    <ul style="width:300px;padding:0px;margin:0px;">
    <asp:Repeater>
    <ItemTemplate>
    <li style="width:100px;padding:0px;margin:0px; float:left; list-style:none;board-bottom:1px dotted #000000">
    <%DataBinder.Eval(Container.DataItem,"")%>
    </li>
    </ItemTemplate>
    </asp:Repeater>
    </ul>