用Repeater绑定数据,怎么让里面绑定的数据一起向上滚动

huangwenquan123 2009-11-26 09:05:01
<asp:Repeater ID="Re_PsHouse_Chuzu" runat="server">
<HeaderTemplate>
<table>
<tr>
<td style="text-align: center">
小区 价格 发布时间 有效天数
</td>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td style="text-align: center; width: 400px;">
<marquee direction="up" width="400px" height="20px" scrollamount="1" behavior="scroll"
onmouseover="this.stop()" onmouseout="this.start()">
<asp:HyperLink ID="HyperLink1" ForeColor="blue" runat="server" Text='<%#Eval("AreaName","{0}"+Eval("Chuzu_Address")) %>' NavigateUrl="~/MainForm.aspx"></asp:HyperLink>
<%#Eval("Chuzu_Money") %>
<%#Eval("Chuzu_Time") %>
<%#Eval("Chuzu_Day") %>
</marquee>
</td>
</tr>
</ItemTemplate>
<FooterTemplate>
</table></FooterTemplate>
</asp:Repeater>
我是用repeater绑定的
然后用marquee让它滚动
可是滚动都是一条一条滚动
怎么让它把显示的全部数据一起向上滚动
...全文
163 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
lovebaby 2009-11-26
  • 打赏
  • 举报
回复
ItemTemplate本身即为循环项模板,你的代码会循环出很多ItemTemplate,把marquee标签放到其他项模板里或干脆直接放到Repeater控件外面都行。
huangwenquan123 2009-11-26
  • 打赏
  • 举报
回复
不行啊
我试了还是动不了
xfreyes 2009-11-26
  • 打赏
  • 举报
回复
YnSky 2009-11-26
  • 打赏
  • 举报
回复
<marquee direction="up" width="400px" height="20px" scrollamount="1" behavior="scroll"onmouseover="this.stop()" onmouseout="this.start()">
<table>
</HeaderTemplate>

<FooterTemplate>
</table>
</marquee>
</FooterTemplate>

wszhoho 2009-11-26
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 watsonchia 的回复:]
把marquee放到HeaderTemplate
[/Quote]
是这样的。
watsonchia 2009-11-26
  • 打赏
  • 举报
回复
<ItemTemplate>里marquee标签不要,其他改成如下

<HeaderTemplate>
<table>
<tr>
<td style="text-align: center">
小区 价格 发布时间 有效天数
</td>
</tr>
</table>
<marquee direction="up" width="400px" height="20px" scrollamount="1" behavior="scroll"onmouseover="this.stop()" onmouseout="this.start()">
<table>
</HeaderTemplate>

<FooterTemplate>
</table>
</marquee>
</FooterTemplate>
watsonchia 2009-11-26
  • 打赏
  • 举报
回复
把marquee放到HeaderTemplate

62,046

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧