Handling empty widget containers

Posted by Community Admin on 04-Aug-2018 10:01

Handling empty widget containers

All Replies

Posted by Community Admin on 23-May-2012 00:00

I'm currently working on a site where there is no guarantee that a widget container (i.e. asp:ContentPlaceholder) will have any widgets.

I'm wondering if it's possible to only display a widget container if it contains widgets?

Example:-

<h2><asp:ContentPlaceHolder ID="heading" runat="server" /></h2>

Assuming that no widgets are placed into the "heading" placeholder, how could I determine this so that I can hide the <h2> tags so that they do not appear?

This thread is closed