Hi,
The reason that it doesn't work is because the Accordion control is actually a wrapper for the AccordionExtender, so the ClientID of the element is not the same thing as the ClientID of the behavior. Unfortunately, the ClientID of the underlying Extender is not exposed through the Accordion class, but you can obtain its value by appending _AccordionExtender to the ClientID like so:
ClientScript.RegisterArrayDeclaration("arrAccordionBehaviors", "'" + this.accControl.ClientID + "_AccordionExtender'");
Now you can reference the behaviors array like so:
for (var j = 0; j < arrAccordionBehaviors.length; j++) {
var bh = $find(arrAccordionBehaviors[j]);
if (!bh) continue;
try {
bh.add_propertyChanged(accordionChange);
} catch (e) {
alert(e.message)
};
}
Hope that helps!
-Sabrina V