将多条从数据库中读出的数据绑定在repeater控件中,但不能全部显示,先显示10条,若绑定的数据大于10条时,就开始上下连续滚动.
就像http://www.companycn.com/的客户案例的效果,这在asp.net里怎么实现.
谢谢!!!!

解决方案 »

  1.   

    问题是要控制显示的条数.
    repeater控件绑定的数据是全部的.
      

  2.   

    <td>
      <div align="center">
        <script language="JavaScript">
    ns4=(document.layers)?true:false
    var obj=document.getElementsByName("t1");
    if (ns4)
    {
       document.write("<div name=divOuter>")
       document.write("<layer name=divmq onMouseover='Javascript:mvStop()' onMouseout='Javascript:mvUp()'>")
    }
    else
    {
       document.write("<marquee behavior=scroll align=top direction=\"up\" scrolldelay=50 scrollamount=1 width=100% height=150truespeed onMouseOver=\"this.stop()\" onMouseOut=\"this.start()\">")
    }
         </script>
         <table class="black12" cellSpacing="0" cellPadding="0" width="100%" border="0">
    <asp:repeater id="repeatProduct" Runat="server">
             <ItemTemplate>
       <tr id="t1">
    <td height="25" align="center" valign="top" background="images/index_51.jpg">
      <a href='<%# DataBinder.Eval(Container.DataItem, "producturl") %>' target=_blank>
      <%# DataBinder.Eval(Container.DataItem, "productname") %></a> </td>
              </tr>
           </ItemTemplate>
    </asp:repeater>
    </table>
    </div>
    </td>
    这样显示的结果总是从中间开始出来.又不能连续显示.
    如果要先显示10条,若绑定的数据大于10条时,就开始上下连续滚动.