Collapsible panel in ASP.NET

I am using ASP.NET AJAX control suite and I am having a problem using a resettable panel in my code. I have the following code:

<table><tr>
<td class="bg">
    <a class="bg" href="javascript:void(0);">
    <asp:CheckBox runat="server" ID="chkSMSGrossRevenue" Text="Gross Revenue (Daily, Monthly, Yearly)" /></a>
    <asp:Panel runat="server" ID="pnlSMSGrossRevenue" Height="0">
        testing
    </asp:Panel>
</td></tr></table>
<cc1:CollapsiblePanelExtender runat="server" ID="cpeSMSGrossRevenue" TargetControlID="pnlSMSGrossRevenue"
    ExpandControlID="chkSMSGrossRevenue" CollapseControlID="chkSMSGrossRevenue">
</cc1:CollapsiblePanelExtender>

      

What I am trying to do is expand the pane when there is a check mark in my checkbox and collapse it when there is no check mark. The problem is that I can always see the "test" work that is in my panel ... so I assume it never crashes. When I click on the checkbox it collapses, but then expands again. Can anyone tell me what I am doing wrong?

0


source to share


3 answers


I figured out the question. It has to do with my tag at the top of my page.



0


source


since you are opening the page without a checkbox, set the collapsible panel expander property to start collapsing



Collapsed="true"

      

0


source


Setting CollapsedSize="1"

resolves the error

0


source







All Articles