public void RaisePostBackEvent(string eventArgument) { if (eventArgument != null) { if (eventArgument.StartsWith("selectedindexchanging")) { string[] values = eventArgument.Split(':'); int selectedIndex = Convert.ToInt32(values[1]); int selectedOldIndex = Convert.ToInt32(values[2]); AccordionChangingEventArgs args = new AccordionChangingEventArgs(selectedIndex, selectedOldIndex); this.OnSelectedIndexChanging(args); } if (eventArgument.StartsWith("selectedindexchanged")) { string[] values = eventArgument.Split(':'); int selectedIndex = Convert.ToInt32(values[1]); int selectedOldIndex = Convert.ToInt32(values[2]); AccordionChangedEventArgs args = new AccordionChangedEventArgs(selectedIndex, selectedOldIndex, this.SelectedItem, this); this.OnSelectedIndexChanged(args); } } }
protected virtual void OnSelectedIndexChanged(AccordionChangedEventArgs e) { AccordionChangedEventHandler eventHandler = (AccordionChangedEventHandler)Events[EventSelectedIndexChanged]; if (eventHandler != null) { this.SelectedIndex = e.NewIndex; eventHandler(this, e); } }