user2182185
user2182185

Reputation: 1

Setting placeholder visibility using if statement issue

I have to make If statement that will make my literal inside placeholder visible if placeholder is set to true. if not the whole placeholder and literal inside of it will not render. here is asp control, but i need to do that if in code behind...

<asp:Panel ID="pnlFooterColumn" runat="server" CssClass="col">     
    <asp:PlaceHolder ID="phlFooterColumnTitle" runat="server">
        <h5>
             <asp:Literal ID="ltrFooterColumnTitle" runat="server"></asp:Literal>
        </h5>
    </asp:PlaceHolder>

does anyone have idea how to do that? thanks!

Upvotes: 0

Views: 1710

Answers (1)

nunespascal
nunespascal

Reputation: 17724

pnlFooterColumn.Visible = false;

if a panel is set to Visible false none of its contents are rendered.

Upvotes: 3

Related Questions