Collapsible Panel Extender

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
 
N

Nathan Sokalski

You can use the Collapsed property. This is a Boolean property, so it should
be pretty simple to use. Good Luck!
 
M

msnews.microsoft.com

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
 
N

Nathan Sokalski

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

Members online

Forum statistics

Threads
473,744
Messages
2,569,481
Members
44,900
Latest member
Nell636132

Latest Threads

Top