"Atlas" Toolkit - Using an Image in a CollapsiblePanelExtender

Want to use an image instead of a text label to trigger the expanding/collapsing events of an "Atlas" CollapsiblePanel? You still use a "Label" control for the trigger, but you switch it up a bit by setting the "ExpandText" and "CollapseText" properties to the HTML code for an image, like this:

        CollapsiblePanelProperties.ExpandedText = "<img src='\website\images\toggle_expand.gif' />"
        CollapsiblePanelProperties.CollapsedText = "<img src='\website\images\collapsed_toggleExpand.gif' />"

It's the same trick you can use in DataGrids to create an image without an image control, and creates the desired effect, as shown below.

In a future post, I'll illustrate in detail how to combine several "Atlas" extenders to create a "Poor Man's Portal" control. I just need to clean up the code and make it a little more "elegant".


  • Ha! Wow - that is as cool way of doing it. Never thought of that one!

  • Nice work... I'm interested in something else though, I want to be able to use multiple controls to manage the collapsing and espanding of the collapsible panel. i.e. if u had a panel for adding records, you'd want update, save and cancel to all collapse the panel. How can I run this in code?

Comments have been disabled for this content.