Hey all,
I'm trying to create Accordian Controlls Dynammically on Page Load, code wise this is what I have so far:
// Create dynamic acordian control
AjaxControlToolkit.Accordion info = new AjaxControlToolkit.Accordion();
AjaxControlToolkit.AccordionPane infoPane = new AjaxControlToolkit.AccordionPane();
info.ID = hostelId;
info.FadeTransitions = true;
info.FramesPerSecond = 10;
info.TransitionDuration = 500;
Literal headerContent = new Literal();
headerContent.ID = hostelId + "_Header";
headerContent.Text = hostelName + " More Info ";
Literal content = new Literal();
content.ID = hostelId + "_Content";
content.Text = hostelName + " BOOM ";
infoPane.HeaderContainer.Controls.Add(headerContent);
infoPane.ContentContainer.Controls.Add(content);
info.Panes.Add(infoPane);
cell3.Controls.Add(info);
When I run the page, the contente for the Accordian control displays, but its just text and not the actual accordian. Just wondering if someone can point me in the right direction.