Ajax collapsible panel not collapsing
Posted on 2010-08-31
I have a serie of collapsible panels in a form, that are collapsed when the form is first open.
I have added a link button to collapse or open the panels. But for some reason I cannot make the panels collapse or open.
This is the code in my link button:
Protected Sub btnColPanel_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnColPanel.Click
NVar.bCollapsed = Not NVar.bCollapsed
If NVar.bCollapsed = True Then
Me.btnColPanel.Text = "Display assessment information"
Me.ColApp.Collapsed = True
Me.ColSaving.Collapsed = True
Me.ColCE.Collapsed = True
Me.btnColPanel.Text = "Hide assessment information"
Me.ColApp.Collapsed = False
Me.ColCE.Collapsed = False
Me.ColSaving.Collapsed = False
I have tried to set the Causevalidation of the button to true or false, it did not work.
I have moved the second part of the code where the (panel collapsed) to the init, load and prerender of the form, it did not work.
Thanks for your help.