Collapsible Panel Extender

  • Thread starter Thread starter David C
  • Start date Start date
D

David C

I am using a CollapsiblePanelExtender to show/hide a FormView control inside
another FormView and it works great. Now I would like to know when that
Panel is collapsed in code but I do not know how to reference it in my page
code. Can someone tell me how to reference it and how to check its "state"?
Thanks.

David
 
You can use the Collapsed property. This is a Boolean property, so it should
be pretty simple to use. Good Luck!
 
My problem is that the page does not postback so I cannot check the
property. Do you know if there is some way in javascript to handle this?
Thanks.

David
 
The CollapsiblePanel Extender generates a hidden field with the ID
extenderid_ClientState. I have not yet looked into what it uses for the
values, but you can easily find this out by using something like:

window.alert(document.getElementById('extenderid_ClientState').value);

If you put this in a button, you can change the state as you normally would
and then click the button to see what the value is afterwards:

<asp:Button runat="server" Text="extenderid_ClientState"
OnClientClick="window.alert(document.getElementById('extenderid_ClientState').value);return
false;"/>

Hopefully this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top