确定asp.net中的转发器行数 [英] Determine the repeater row count in asp.net
本文介绍了确定asp.net中的转发器行数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我如何确定一次在此转发器中显示的行数?
How i can determine the amount of rows which display in this repeater at once?
<asp:Repeater ID="Repeater1" runat="server" DataSourceID="News" EnableViewState="true">
<ItemTemplate>
<hr />
<div style="color:#036e90; font-weight: bold; font-family:Tahoma; text-align:center ; padding-left:10px"><a href="DisplayNews.aspx"><%#DataBinder.Eval(Container.DataItem, "News_Name")%></a></div>
<div style=" FONT-SIZE: 10pt; FONT-FAMILY: Tahoma ; text-align:center;padding-left:10px"><%#DataBinder.Eval(Container.DataItem, "News_Description")%></div>
<br />
<hr />
</ItemTemplate>
</asp:Repeater>
推荐答案
这也应该起作用:
((Container.Parent为Repeater).DataSource为IList).Count
((Container.Parent as Repeater).DataSource as IList).Count
这篇关于确定asp.net中的转发器行数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文