Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Invisible datalist

Status
Not open for further replies.

rac55

Programmer
Jul 1, 2003
62
AU
Hi

Does anyone know how to set a datalist to invisible...my code is;

<ASP:DataList id="ExpiryDate" runat="server" align="center" font-size="Small" RepeatDirection="Horizontal" RepeatColumns="1" visible="false">
<ItemTemplate>
<%# DataBinder.Eval(Container.DataItem, "ExpDate") %>
</ItemTemplate>
</ASP:DataList>

I have tried visible=false...but this is just ignored

Any ideas where I am going wrong?

Thanks
 
I'm using Visible="False" as well for a dropdownlist and it works just fine. Weird.
 
Or you could wrap it around some <asp:panel> tags. Works great when you need to hide numerous controls at once.

<asp:panel ID="pnlHideMe">
<ASP:DataList id="ExpiryDate" runat="server" align="center" font-size="Small" RepeatDirection="Horizontal" RepeatColumns="1" visible="false">
<ItemTemplate>
<%# DataBinder.Eval(Container.DataItem, "ExpDate") %>
</ItemTemplate>
</ASP:DataList>
</asp:panel>

Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top