This is a CollapsiblePanelExtender with the usual extend and collapse buttons.here yuou can click event fire off when the extender is extended and a different click event fire off when the extender is collapsed.
Read The Full Tutorial.
This is a CollapsiblePanelExtender with the usual extend and collapse buttons.here yuou can click event fire off when the extender is extended and a different click event fire off when the extender is collapsed.
Here is the code you can check:
CollapsiblePanelExtender extendatron = new CollapsiblePanelExtender(); extendatron.ID = "cpe" + MenuId; extendatron.TargetControlID = "pnlContent" + strMenuId; extendatron.ExpandControlID = "pnlMenu" + strMenuId; extendatron.CollapseControlID = "pnlMenu" + strMenuId; extendatron.Collapsed = bCollapsed; extendatron.TextLabelID = strMenuName; extendatron.ExpandedText = m_strButtonLabelHide; extendatron.CollapsedText = m_strButtonLabelShow; extendatron.ImageControlID = "imglnk" + strMenuId; extendatron.CollapsedImage = "~/App_Themes/default/nbExpand.gif"; extendatron.ExpandedImage = "~/App_Themes/default/nbCollapse.gif"; extendatron.SuppressPostBack = true; extendatron.ScrollContents = false;
var extender = $find('extendatron'); //this would be <%=myExtender.ClientID%> extender.add_collapsed( function() { alert('collapsed'); }); extender.add_expanded( function() { alert('expanded'); });
|