Ajax Accordion

Eduardo Lorenzo

Regular
Joined
Jun 27, 2006
Messages
87
Hi guys, am having some small problems with an Ajax accordion control. Here is the code I use to populate the items

Visual Basic:
 for (paneCounter = 0; paneCounter < navMgr.MainNodeList[headerCounter].ChildList.Count - 1; paneCounter++)
                 {
                    PanelItem = navMgr.MainNodeList[headerCounter].ChildList[paneCounter].Text;
                    HyperLink lContent = new HyperLink();
                    lContent.NavigateUrl = "~/Families/default.aspx?family=" + PanelItem;
                     lContent.Text = PanelItem;
                     myPane.ContentContainer.Controls.AddAt(paneCounter, lContent);
                  }

but the items when displayed are not on top of each other but beside each other.

Any inputs?
 
Not sure, haven't played with this control yet but what about a simple crlf or a <br> added to the string

PanelItem = navMgr.MainNodeList[headerCounter].ChildList[paneCounter].Text;
 
My appologies for not updating this thread.

This was solved by:
1. Creating the Panel
2. Adding a BullettedList item instead of hyperlinks
3. Set the displaymode of the BullettedList object to Hyperlink

It now works like a charm and also, rendered on the browser as <li> items which are good for SEO.
 
Back
Top