显示如这个网http://www.xianhua001.com/category-1-b0-%B9%FA%C7%EC%BD%DA.html列出的花.
我的思路:一种用datalist显示。一种把每种商品做成用户控件,后台循环把每个要显示的商品用户控件加到table.第一种听说前台用服务器控件性能不高,每二种好像听说用多用户控件不好。
大家说要怎样做最高效?

解决方案 »

  1.   

    我倒觉得这样的需求什么控件都不用,直接输出HTML来得灵活~
      

  2.   


    要照你这么说,asp.net根本就没有存在的必要了
      

  3.   

    就用datalist,模板列显示出来就好了
      

  4.   

    DataList显示很好啊
    你要求最高效做法的话  直接用HTMl 做很高效的
      

  5.   


    <asp:datalist id="MyList" RepeatDirection=Horizontal RepeatColumns=2 showfooter=true borderwidth=0 runat=server>
                     <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>
                               <td>
                               <%# DataBinder.Eval(Container.DataItem, "H_Name2")%>
                              </td>
                              </tr>
                              </table> 
                            </td>    
                  </ItemTemplate>
                  <FooterTemplate>
                    </tr>
                      </table>
                  </FooterTemplate>
               </asp:datalist>RepeatDirection=Horizontal 为设置为横向显示RepeatColumns=2 每行显示2条记录img显示图片
    下面的td显示信息我要90分