Sunday, March 11, 2012

Is it possible to programmaticaly create accordion?

There might be a better way to do this now with the new shipment of AJAX, but this code worked perfectly for a project I did when it was still a RC:

objPane =New AccordionPane()
objPane.HeaderContainer.Controls.Add(New LiteralControl("Fileinformation"))
objPane.ContentContainer.Controls.Add(New LiteralControl(strFileInfo))
myAccordion.Panes.Add(objPane)
 

Hope it helps ya.

cool, thks that worked perfectly.

I was trying to add things Like this:

objPane.header.controls.add

and that just doesn't work

don't know why I didn't even try the header and content containers. makes far more sense.

Thanks again.

Regards

The Prophet

No comments:

Post a Comment