Search code examples
asp.net-ajaxaccordionpane

How do I programmatically change ASP.NET ajax AccordionPane with javascript?


I've got an asp.net ajax style AccordionPane control that I am trying to get/set based on some user interactions. However it seems not let me do this with javascript:

function navPanelMove() {  
  var aPane = $get('ctl00_Accordion1_AccordionExtender_ClientState');  
  openPaneID = aPane.get_SelectedIndex();  // doesn't work
}

Solution

  • You'll need to use $find('behaviorId')

    You want the AjaxControlToolkit.AccordionBehavior object, not the DOM elements