Question

I am using the ASP.NET AJAX Control Kit and I am having a problem using a collapsible 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'm trying to do is expand my panel whenever there is a checkmark in my checkbox and collapse it when there is no checkmark. The problem is, I always see the work "test", which is in my panel...so I'm assuming its never collapsing. When I click the checkbox, it collapses, but then immediately re-expands again. Can anyone tell me what I'm doing wrong?

Was it helpful?

Solution 2

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

OTHER TIPS

since you are opening the page with the box unchecked, set the property of the collapsible panel extender to start collapsed

Collapsed="true"

Setting CollapsedSize="1" solves the error

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top