ASP.NET AJAX CollapsiblePanelExtender - Tips and Tricks

Posted by: Suprotim Agarwal , on 11/20/2008, in Category ASP.NET AJAX
Views: 395104
Abstract: As given in the ASP.NET AJAX toolkit documentation, the CollapsiblePanel is a very flexible extender control that allows you to easily add collapsible sections to your web page. In this article, we will see six tips while working with the CollapsiblePanelExtender
ASP.NET AJAX CollapsiblePanelExtender - Tips and Tricks

As given in the ASP.NET AJAX toolkit documentation, the “CollapsiblePanel is a very flexible extender that allows you to easily add collapsible sections to your web page. This extender targets any ASP.NET Panel control” Here are some tips that will help you out in your projects while dealing with CollapsiblePanel Control.

I assume you have some basic experience developing ASP.NET AJAX applications and have installed the ASP.NET AJAX Library and ASP.NET Control Toolkit. As of this writing, the toolkit version is Version 1.0.20229 (if you are targeting Framework 2.0, ASP.NET AJAX 1.0 and Visual Studio 2005) and Version 3.5.20229 (if targeting .NET Framework 3.5 and Visual Studio 2008). Read more about it over here
To apply these tips, I have created a sample with the CollapsiblePanel control. Assuming you have AJAX Control Toolkit for 3.5 installed, Open Visual Studio 2008 > File > New Website > ‘ASP.NET WebSite’ > Enter a name and location for the project > Click Ok.
Drag and drop a <ScriptManager> from the Toolbox to the page. Now add an UpdatePanel to the page. Inside the <ContentTemplate> drag and drop a CollapsiblePanel from the AJAX toolkit. After applying some Css and add properties of the CollapsiblePanel, the mark up will look similar to the following:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
 
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>CollapsiblePanelExtender Tips </title>   
    <style type="text/css">
        .cpHeader
        {
            color: white;
            background-color: #719DDB;
            font: bold 11px auto "Trebuchet MS", Verdana;
            font-size: 12px;
            cursor: pointer;
            width:450px;
            height:18px;
            padding: 4px;           
        }
        .cpBody
        {
            background-color: #DCE4F9;
            font: normal 11px auto Verdana, Arial;
            border: 1px gray;               
            width:450px;
            padding: 4px;
            padding-top: 7px;
        }      
    </style>
   
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <asp:Panel ID="pHeader" runat="server" CssClass="cpHeader">
                <asp:Label ID="lblText" runat="server" />
            </asp:Panel>
 
            <asp:Panel ID="pBody" runat="server" CssClass="cpBody">
            Lorem ipsum dolor sit amet, consectetur adipisicing elit,
            sed do eiusmod tempor incididunt ut labore et dolore magna
aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur
            </asp:Panel>
 
<cc1:CollapsiblePanelExtender ID="CollapsiblePanelExtender1" runat="server" TargetControlID="pBody" CollapseControlID="pHeader" ExpandControlID="pHeader"
Collapsed="true" TextLabelID="lblText" CollapsedText="Click to Show Content.." ExpandedText="Click to Hide Content.."
CollapsedSize="0">
            </cc1:CollapsiblePanelExtender>
           
        </ContentTemplate>
        </asp:UpdatePanel>
    </div>
    </form>
</body>
</html>
 
Tip 1: How to Expand/Collapse the ASP.NET AJAX CollapsiblePanel programmatically using JavaScript?
In order to expand/collapse the CollapsiblePanel programmatically, use the following code. In this sample, we will be expanding/collapsing the CollapsiblePanel on a button click. The button is kept outside the CollapsiblePanel but inside the UpdatePanel.
...
<asp:Button ID="btnClick" OnClientClick="ExpandCollapse()"
runat="server" Text="Expand/Collapse" />
</ContentTemplate>
</asp:UpdatePanel>
Add JavaScript in the <head> tag as shown below:
    <script type="text/javascript">
 
        function ExpandCollapse() {           
            var collPanel = $find("CollapsiblePanelExtender1");
            if (collPanel.get_Collapsed())
                collPanel.set_Collapsed(false);
            else
                collPanel.set_Collapsed(true);
        }      
 
    </script>
Tip 2: How to Expand/Collapse the ASP.NET AJAX CollapsiblePanel programmatically using C# or VB.NET?
Set the ‘Collapsed’ property to true (collapses panel) or false (expands panel). Alternatively, setting the ‘ClientState’ to true (collapses panel) or false (expands panel) does the trick.
C#
    protected void btn_Collapse(object sender, EventArgs e)
    {
        // Expand
        this.CollapsiblePanelExtender1.Collapsed = false;
        this.CollapsiblePanelExtender1.ClientState = "false";
        // Collapse
        // Expand
        this.CollapsiblePanelExtender1.Collapsed = true;
        this.CollapsiblePanelExtender1.ClientState = "true";
    }
 
VB.NET
 
      Protected Sub btn_Collapse(ByVal sender As Object, ByVal e As EventArgs)
            ' Expand
            Me.CollapsiblePanelExtender1.Collapsed = False
            Me.CollapsiblePanelExtender1.ClientState = "false"
            ' Collapse
            ' Expand
            Me.CollapsiblePanelExtender1.Collapsed = True
            Me.CollapsiblePanelExtender1.ClientState = "true"
      End Sub
Tip 3: How to prevent flickering to occur when the ASP.NET AJAX Collapsible Panel first loads?
At Page Load, if the CollapsiblePanel expands and then collapses again causing a flashing to occur, you can solve it by setting the height of the Panel body to 0 and setting the overflow to hidden
        .cpBody
        {
            background-color: #DCE4F9;
            font: normal 11px auto Verdana, Arial;
            border: 1px gray;               
            width:450px;           
            padding: 4px;
            padding-top: 2px;
            height:0px;
          overflow: hidden;
        }
Tip 4: How to make an ASP.NET AJAX CollapsiblePanelExtender behave like an Accordion control?
Accordion allows you to have multiple panes where only one can be expanded at a time. When one of the panels is expanded by the user, the other collapses. Let us see how to achieve this functionality in the CollapsiblePanelExtender. I got this tip from Vince Xu - MSFT.
Add two Panels and corresponding CollapsiblePanelExtenders for the two Panels as shown below:
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <asp:Panel ID="pHeader" runat="server" CssClass="cpHeader">
                <asp:Label ID="lblText" runat="server" />
            </asp:Panel>
            <asp:Panel ID="pBody" runat="server" CssClass="cpBody" >
            Lorem ipsum dolor sit amet, consectetur adipisicing elit,
            sed do eiusmod tempor incididunt ut labore et dolore magna
aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur
            </asp:Panel>
<cc1:CollapsiblePanelExtender ID="CollapsiblePanelExtender1" runat="server" TargetControlID="pBody" CollapseControlID="pHeader" ExpandControlID="pHeader"
Collapsed="false" TextLabelID="lblText" CollapsedText="Click to Show Content.." ExpandedText="Click to Hide Content.." CollapsedSize="0">
            </cc1:CollapsiblePanelExtender>           
          
            <asp:Panel ID="pHeaderTwo" runat="server" CssClass="cpHeader">
                <asp:Label ID="lblTextTwo" runat="server" />
            </asp:Panel>
            <asp:Panel ID="pBodyTwo" runat="server" CssClass="cpBody" >
            This is my second panel
            </asp:Panel>
           
<cc1:CollapsiblePanelExtender ID="CollapsiblePanelExtender2" runat="server" TargetControlID="pBodyTwo" CollapseControlID="pHeaderTwo" ExpandControlID="pHeaderTwo"
Collapsed="true" TextLabelID="lblTextTwo" CollapsedText="Click to Show Content.." ExpandedText="Click to Hide Content.." CollapsedSize="0">
            </cc1:CollapsiblePanelExtender>
          
        </ContentTemplate>
        </asp:UpdatePanel>
Now add some JavaScript in the <head> as shown below:
    <script type="text/javascript">
 
        function pageLoad(sender, args) {           
            for (num = 1; num < 3; num++) {
                $find("CollapsiblePanelExtender" + num).add_expandComplete(coll_ExpandedComplete);               
            }
        }
 
        function coll_ExpandedComplete(sender, arg) {           
            for (num = 1; num < 3; num++) {
var CollapsiblePanel = $find("CollapsiblePanelExtender" + num);
if (sender._expandControlID != CollapsiblePanel._expandControlID)
                    CollapsiblePanel.collapsePanel(CollapsiblePanel._expandControlID);
            }          
        }               
       
    </script>  
Note: Observe that the first Panel is expanded on load.
Tip 5: How to add an ASP.NET AJAX CollapsiblePanelExtender dynamically?
Use the following code to create and add a CollapsiblePanelExtender dynamically
C#
using AjaxControlToolkit;
 
    protected void Page_Load(object sender, EventArgs e)
    {        
        // Create Header Panel
        Panel panelHead = new Panel();
        panelHead.ID = "pH";
        panelHead.CssClass = "cpHeader";
        // Add Label inside header panel to display text
        Label lblHead = new Label();
        lblHead.ID = "lblHeader";
        panelHead.Controls.Add(lblHead);
 
        //Create Body Panel
        Panel panelBody = new Panel();
        panelBody.ID = "pB";
        panelBody.CssClass = "cpBody";
        // Add Label inside body Panel to display text
        Label lblB = new Label();
        lblB.ID = "lblBody";
        lblB.Text = "This panel was added dynamically";
        panelBody.Controls.Add(lblB);
 
        // Create CollapsiblePanelExtender
        CollapsiblePanelExtender cpe =
            new CollapsiblePanelExtender();
        cpe.TargetControlID = panelBody.ID;
        cpe.ExpandControlID = panelHead.ID;
        cpe.CollapseControlID = panelHead.ID;
        cpe.ScrollContents = false;
        cpe.Collapsed = true;
        cpe.ExpandDirection =
        CollapsiblePanelExpandDirection.Vertical;
        cpe.SuppressPostBack = true;
        cpe.TextLabelID = lblHead.ID;
        cpe.CollapsedText = "Click to Show Content..";
        cpe.ExpandedText = "Click to Hide Content..";
 
        this.UpdatePanel1.ContentTemplateContainer.Controls.Add(panelHead);
        this.UpdatePanel1.ContentTemplateContainer.Controls.Add(panelBody);
        this.UpdatePanel1.ContentTemplateContainer.Controls.Add(cpe);
 
    }
 
VB.NET
Imports AjaxControlToolkit
 
      Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
            ' Create Header Panel
            Dim panelHead As New Panel()
            panelHead.ID = "pH"
            panelHead.CssClass = "cpHeader"
            ' Add Label inside header panel to display text
            Dim lblHead As New Label()
            lblHead.ID = "lblHeader"
            panelHead.Controls.Add(lblHead)
 
            'Create Body Panel
            Dim panelBody As New Panel()
            panelBody.ID = "pB"
            panelBody.CssClass = "cpBody"
            ' Add Label inside body Panel to display text
            Dim lblB As New Label()
            lblB.ID = "lblBody"
            lblB.Text = "This panel was added dynamically"
            panelBody.Controls.Add(lblB)
 
            ' Create CollapsiblePanelExtender
            Dim cpe As New CollapsiblePanelExtender()
            cpe.TargetControlID = panelBody.ID
            cpe.ExpandControlID = panelHead.ID
            cpe.CollapseControlID = panelHead.ID
            cpe.ScrollContents = False
            cpe.Collapsed = True
            cpe.ExpandDirection = CollapsiblePanelExpandDirection.Vertical
            cpe.SuppressPostBack = True
            cpe.TextLabelID = lblHead.ID
            cpe.CollapsedText = "Click to Show Content.."
            cpe.ExpandedText = "Click to Hide Content.."
 
            Me.UpdatePanel1.ContentTemplateContainer.Controls.Add(panelHead)
            Me.UpdatePanel1.ContentTemplateContainer.Controls.Add(panelBody)
            Me.UpdatePanel1.ContentTemplateContainer.Controls.Add(cpe)
 
      End Sub
 
Tip 6: How to create a Smooth Animation while Expanding/Collapsing the ASP.NET AJAX CollapsiblePanelExtender?
To create a smooth animation while expanding/collapsing panels, change the fps and duration property using client script as shown below:
<script type="text/javascript">
 
        function pageLoad(sender, args) {
            smoothAnimation();
        }
       
       
    function smoothAnimation()
    {
            var collPanel = $find("CollapsiblePanelExtender1");
            collPanel._animation._fps = 45;
            collPanel._animation._duration = 0.90;
    }
 
</script>  
Well those were some tips associated with the AJAX CollapsiblePanelExtender. If you have a tip about this control not covered in this article, share the via the comments section. I hope this article was useful and I thank you for viewing it.
If you liked the article,  Subscribe to the RSS Feed or Subscribe Via Email  

This article has been editorially reviewed by Suprotim Agarwal.

Absolutely Awesome Book on C# and .NET

C# and .NET have been around for a very long time, but their constant growth means there’s always more to learn.

We at DotNetCurry are very excited to announce The Absolutely Awesome Book on C# and .NET. This is a 500 pages concise technical eBook available in PDF, ePub (iPad), and Mobi (Kindle).

Organized around concepts, this Book aims to provide a concise, yet solid foundation in C# and .NET, covering C# 6.0, C# 7.0 and .NET Core, with chapters on the latest .NET Core 3.0, .NET Standard and C# 8.0 (final release) too. Use these concepts to deepen your existing knowledge of C# and .NET, to have a solid grasp of the latest in C# and .NET OR to crack your next .NET Interview.

Click here to Explore the Table of Contents or Download Sample Chapters!

What Others Are Reading!
Was this article worth reading? Share it with fellow developers too. Thanks!
Share on LinkedIn
Share on Google+

Author
Suprotim Agarwal, MCSD, MCAD, MCDBA, MCSE, is the founder of DotNetCurry, DNC Magazine for Developers, SQLServerCurry and DevCurry. He has also authored a couple of books 51 Recipes using jQuery with ASP.NET Controls and The Absolutely Awesome jQuery CookBook.

Suprotim has received the prestigious Microsoft MVP award for Sixteen consecutive years. In a professional capacity, he is the CEO of A2Z Knowledge Visuals Pvt Ltd, a digital group that offers Digital Marketing and Branding services to businesses, both in a start-up and enterprise environment.

Get in touch with him on Twitter @suprotimagarwal or at LinkedIn



Page copy protected against web site content infringement 	by Copyscape




Feedback - Leave us some adulation, criticism and everything in between!
Comment posted by Rakesh Khambra on Wednesday, November 25, 2009 5:11 AM
First of I would like to say THANKS reason being I have seen lot of sites to understand the code of .net but the method to understanding of this site is different to others. That is good site to get code and implement the code. Thanks
Comment posted by Shaunny on Tuesday, December 15, 2009 6:23 AM
Thanks for the article; the explanation was very clear and useful. I do have one question, which is how does one expand/collapse the panel with smooth animation server side, or is tip 6 suppose to cater for this?

Thanks again!
Comment posted by Shaunny on Tuesday, December 15, 2009 7:59 AM
PS. I solved my problem with the pageLoad running behind the server script inserts (ScriptManager.RegisterStartupScript) by delaying the script by a millisecond with a setTimeout callback. Not the most eligent of solution, but does the trick.
Comment posted by mcdc on Tuesday, December 22, 2009 4:04 PM
just want I was looking for.  thanks for posting.
Comment posted by tpriede on Friday, December 25, 2009 2:08 PM
Hello,
This article is really good and helpfull. Personally, I'm not very experienced on AJAX control and I was looking for something clear regarding collapsible panels.
However, when trying your example there is something that doesn't work: the expand action
Comment posted by tpriede on Friday, December 25, 2009 2:09 PM
Hello,
This article is really good and helpful. Personally, I'm not very experienced with AJAX controls and I was looking for something clear regarding collapsible panels. Your article is.
However, when trying your example, there is something that doesn't work: the expand action. The panel does not expands neither by clicking on the header panel nor by clicking on the Collapse/Expand button, regardless it’s done with JavaScript or C#. In order to test if the panel was working I have set the Collapse property to False so the panel opens expanded and it does. When I click on the header panel or on the C# button, the panel collapse, but then it does not expand again on any action.

I have created the page with the exact code published in the article. Could you please help me find why the expand action doesn’t work?

Besides, I have another question. Is it possible to place controls like radio buttons or List Boxes, etc. on a collapsible panel? If not, is there any other AJAX control where I can show and hide controls as part of a content region/panel?

Thank you in advance.
Antonio Priede
Comment posted by Jack on Thursday, February 18, 2010 5:37 PM
Some of the tips are useful, except Tip #1.  How do you implement get_Collapsed() and set_Collapsed()?
Comment posted by Ivelin Andreev (Interconsult Bulgaria Ltd.) on Thursday, March 11, 2010 10:00 AM
I found this article while trying to spot more elegant way for eliminating flickering.
I have the following remarks:
The tip for flickering will NOT work. The proposed solution WILL NOT flicker for closed panels BUT WILL for open panels. To fix this use the following:
1. use ClientState property of the extender to determine on the server whether the panel is collapsed or not (Collapsed property will not show what has happened on the client)
2. for the extenders that are collapsed use TargetControlID to dynamically search in the extender parent for the specific panel (or other control type that you may use)
3. for the target control apply inline style height and set it to 0px (if it is collapsed), otherwise set it to empty string

The code could be similar to the one below:
bool collapsed = bool.Parse(cpe.ClientState);
WebControl ctrl = cpe.Parent.FindControl(cpe.TargetControlID) as WebControl;
if (ctrl!=null)
    ctrl.Style["height"] = collapsed ? "0px" : "";
Comment posted by daniel on Monday, July 19, 2010 12:33 PM
i create a new webapplication and copy the code to the page and work!

But when i copy the code to a webapplication that i have been working i get an error in :

$find("CollapsiblePanelExtender1");

this returns null... the version of ajax in the booth is 3.5

can you help, thanks
Comment posted by RituRaj Pandey on Saturday, July 24, 2010 9:25 AM
Thanks
Comment posted by Dennis on Tuesday, August 3, 2010 1:04 AM
very good article saved a lot of time keep it up
Comment posted by snopbear on Thursday, September 23, 2010 10:02 AM
good article but it's a static one ... we need to see how we can get data from database and display it with...
Comment posted by pavan on Thursday, October 28, 2010 2:36 AM
this is good but give me example design in computer view
Comment posted by suresh on Wednesday, December 1, 2010 8:53 AM
i can't able to get TargetControlID property of collapsiblepanel extender from vb.net code behind page. How was you get this code work?
Comment posted by Vijay Jadhav on Tuesday, December 14, 2010 1:38 AM
Hi all,

The article is superb.

Tip number 3 is very important as my point of view. I was looking for such tip from last 3 to 4 days.

In short, overall article is really nice.

Thanks.
Comment posted by Stijn Verhaegen on Monday, February 21, 2011 9:39 AM
As a previour poster, I cannot get tip #6 to work. the $find does not fidn the collapsiblePanelExtender control. I made sure its not in a naming container or anything.
Comment posted by Stijn Verhaegen on Monday, February 21, 2011 9:40 AM
As a previous poster, I cannot get tip #6 to work. the $find does not fidn the collapsiblePanelExtender control. I made sure its not in a naming container or anything.
Comment posted by Shwetank Pandey on Friday, February 25, 2011 3:24 AM
I am using Collapsible panel to Create a Report , it has been Created successfully now i want that Data to be exported to Excel and Word how to do that?????  
Comment posted by Pete on Tuesday, March 8, 2011 9:23 AM
If you are having problems with $find("CollapsiblePanelExtender1") returning null (usually in master Pages) use $find('<%= CollapsiblePanelExtender1.ClientID %>') instead

Comment posted by aida on Sunday, April 3, 2011 1:17 PM
i have table category and product and for every category there are  many products .I want to place category in accordion and its products in collapsible panel.please help me how can i do this.???
Comment posted by shilpa on Tuesday, June 28, 2011 2:02 AM
very nice article...
thanks a lot!!!
Comment posted by Dheeraj @ Techreuters on Thursday, August 4, 2011 1:25 PM
Really Nice part of coding very clean and impressive coding
Thanks for sharing!!!
Comment posted by Marc Anthony on Thursday, August 18, 2011 6:09 PM
Thanks, very nice article, i want to tell you the situation with CollapsiblePanelExtender
i had a problem with CollapsiblePanelExtender and userwebcontrol, i need to include the CollapsiblePanelExtender functionallity on webform that load a webusercontrol, and the simple webform include a master.page, the problem is that the panel not colapsed, when i make click on the panel the panel inmediatly refresh the data on panel. I want know if somebody can tell me how i can solve this problem please.
M. Anthony.
Comment posted by David on Wednesday, October 12, 2011 1:24 AM
Hi, I have used tip5, but it is not working, it show an error in script. Please help.
Comment posted by Sudhanshu Verma on Wednesday, November 9, 2011 4:30 AM
thanks a lot.
Comment posted by Rajesh Singh on Monday, January 2, 2012 7:45 AM
This is best one article so far I have read online. I would like to appreciate you for making it very simple and easy.  I have found another nice post related to this post over the internet which also explained very well. For more details you may check it by visiting this url....
http://mindstick.com/Articles/d357451a-b6eb-4ce1-9368-064c143e5232/?Ajax%20Toolkit%20CollapsiblePanelExtender%20Control%20in%20ASP.Net

Thanks
Comment posted by Ravindra Parcha on Tuesday, January 31, 2012 12:01 AM
Hello Sir,It would be great if you keep  screenshots of the topic. it will be amazingly helpful.
Comment posted by appreciative user on Wednesday, March 7, 2012 3:32 AM
Thank you!!!
Comment posted by Shalan on Sunday, March 25, 2012 5:36 AM
Great article! To target the CollapsiblePanelExtender client-side, try:   var collPanel = $find("<%= CollapsiblePanelExtender1.ClientID %>");
Comment posted by asp.net user on Saturday, June 23, 2012 3:30 AM
I am creating collapsible panel extender dynamically as mentioned in tip number 5 . How do i stop the flicker to occur.If i set the height to 0 on clicking the panel header it doesnt expand.. There is something wrong. can you please help?
Comment posted by prakash on Monday, June 25, 2012 1:54 AM
How to make collapsibl to work like this http://jqueryui.com/demos/tabs/#collapsible
Comment posted by Nikita Somaiya on Monday, August 6, 2012 6:32 AM
Good Article!!!!! saved
Comment posted by sachin on Thursday, August 9, 2012 6:16 AM
just awesome
Comment posted by mmmmmm on Monday, October 1, 2012 4:55 AM
mmmmmm
Comment posted by Leoraul on Thursday, October 4, 2012 12:06 PM
FYI

If working with VS 2010 and version 4.0 of the .Net Framework, for Tip #4 to work, the CollapsiblePanelExtender controls will need the following property set: ClientIDMode="Static"

Thanks to the author of the article.
Comment posted by Senthil on Wednesday, February 27, 2013 12:58 AM
Superb Article
Comment posted by Ravindra S on Thursday, July 4, 2013 12:35 AM
One of the fine article on CollapsiblePanelExtender I've come across.
Comment posted by sagar on Friday, August 30, 2013 6:05 AM
thanks
Comment posted by vijaya on Tuesday, October 8, 2013 1:58 AM
Thank you
Comment posted by Malar on Tuesday, December 17, 2013 6:15 AM
hi.. how to set the expanded size of an extender in client side? Thanks in advance
Comment posted by ET on Thursday, December 19, 2013 5:59 PM
Thank you for posting this.  I'm a asp newbie and in a real time crunch.  YOur post has helped a great deal
Comment posted by Agata on Sunday, December 29, 2013 11:18 AM
Hello :) thank you for this article, but I have a question, can I use collapsible panel if all my controls (and panels) are added dynamically to the page and those panels are nested like panel1 is head of panel2 and panel2 is head of panel3 which is head of panel4. Please help me
Comment posted by Agata on Sunday, December 29, 2013 11:54 AM
Hello :) thank you for this article, but I have a question, can I use collapsible panel if all my controls (and panels) are added dynamically to the page and those panels are nested like panel1 is head of panel2 and panel2 is head of panel3 which is head of panel4. Please help me
Comment posted by Jon Stranger on Sunday, January 12, 2014 2:40 PM
Good information. Re Tip 4, personally I find there is a more pleasing result if you attach the event handler to the expanding event rather than the expandComplete event.
Comment posted by praveen on Tuesday, March 11, 2014 8:56 AM
I tried code given in Tip 4, but it gives me javascrpit error for add_expandComplete that It could not be found. What should I do??
Comment posted by praveen on Wednesday, March 12, 2014 12:29 AM
I tried code given in Tip 4, but it gives me javascrpit error for add_expandComplete that It could not be found. What should I do??
Comment posted by g on Thursday, June 5, 2014 3:27 AM
thnx