使用中继器显示列表,如果列表返回空表将为空,所以我显示了一条消息“表为空”,但我也想将表头的可见性设置为 false,是否有一个属性是吗?
repeater.header 什么的?
谢谢
编辑:对于那些不能在黑暗中编程的人
<asp:Repeater id="rptSelectedUtilities" runat="server">
<HeaderTemplate>
<table class="detailstable FadeOutOnEdit">
<tr>
<th style="width:200px;">Utility</th>
<th style="width:200px;">Contacted</th>
<th style="width:200px;">Comment</th>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr>
<th style="width:200px;"><%# Eval("Name") %></th>
<th style="width:200px;"><asp:CheckBox ID="chkMyCheck" runat="server" Checked='<%# Convert.ToBoolean(Eval("Checked")) %>'/></th>
<th style="width:200px;"><%# Eval("Comment") %></th>
</tr>
<asp:Label id="labelTableEmpty" runat="server" Text="There are currently no items in this table." />
</ItemTemplate>
<FooterTemplate>
<asp:Label id="labelTableEmpty" runat="server" Text="There are currently no items in this table." />
</table>
</FooterTemplate>
</asp:Repeater>
谢谢你的帮助