I want to put a if statement in my code behind to make only the item template in my repeater invisible, can i do this?
<asp:Repeater runat="server" ID="Repeater_CategoryMenu">
<HeaderTemplate>
<div id="productCategory">
</HeaderTemplate>
<ItemTemplate>
hey
</ItemTemplate>
<FooterTemplate>
</div>
</FooterTemplate>
</asp:Repeater>
The following code makes the whole repeater invisible not just the item template..
Repeater_CategoryMenu.Visible = false;
You have to handle the
ItemDataBoundevent, so first have this line in yourPage_Load:Then such method: