views:

1066

answers:

3

Hi all,

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?

A: 

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

Collapsed="true"
A: 

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

icemanind
Which tag did you use? I have a similar issue.
John M
A: 

Setting CollapsedSize="1" solves the error