Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi guys, am having some small problems with an Ajax accordion control. Here is the code I use to populate the items

 

 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?

  • 1 month later...
Posted

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;

Ignorance begins with I.
Posted

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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...