DataList横向显示数据

<asp:datalist >                  <HeaderTemplate>
                 <table height=100% width=288 cellpadding=0 cellspacing=0 border=0 >
                 <tr>
                 </HeaderTemplate>
                 <ItemTemplate>
                         <td>
                          <table>
                          <tr>
                          <td width=130>
                           <a href="Hotel/hotelDetail.aspx?H_ID=<%# DataBinder.Eval(Container.DataItem, "H_ID")%>" target=_blank><img height="90" width="130" border=0 src="HotelManage/pic/<%# DataBinder.Eval(Container.DataItem, "H_Pic1")%>" /></a>
                          </td>
                          </tr>
                          <tr>
                          <td>
                           <%# DataBinder.Eval(Container.DataItem, "H_Name")%>
                          </td>
                          </tr>
                          </table>
                        </td>   
              </ItemTemplate>
              <FooterTemplate>
                </tr>
                  </table>
              </FooterTemplate>
           </asp:datalist>

RepeatDirection=Horizontal 为设置为横向显示

RepeatColumns=2 每行显示2条记录

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-23
  • 2022-12-23
  • 2021-11-17
  • 2022-12-23
  • 2022-12-23
  • 2021-09-29
猜你喜欢
  • 2022-01-29
  • 2021-07-08
  • 2021-04-02
  • 2021-11-16
  • 2021-07-09
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案