Create box with h1 only visible when properties are set

Vote:
 

I have created a div (a "linkbox" in the right column) where I have added some URL link-properties. I would also like to have a h1-heading for the linkbox, but i only want the heading to be visible when one or more of the URL properties are set.

How do I do this? I'm thinking a boolean property, but how do I make the page display something else than "True" when I have selected Yes. Instead I would like to display "Links" when the property is set to "yes".

I do not have access to the source code.

#35501
Dec 14, 2009 11:29
Vote:
 

Of course the boolean property-solution was intended as a manual way of hiding the heading... Not the best solution, but at least one way to do it.

Better would be to hide it automatically when no link-properties are set...

#35503
Dec 14, 2009 11:39
Vote:
 

One way to do this is to wrap the content you want to show/hide in an asp net placeholder. This control does not write any output to the page, but you can control it's visibility from code behind or databind it's visible property.

For instance:

<asp:PlaceHolder ID="HideIfNotSet" runat="server" Visible='<%# CurrentPage.Property["LinksProperty"] != null %>'>

The header and list content goes here..

</asp:PlaceHolder>

#35533
Dec 15, 2009 11:24
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.