Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8056505
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T08:43:31+00:00 2026-06-05T08:43:31+00:00

I am using the AJAXToolkit Accordion control and dynamically adding panes to it based

  • 0

I am using the AJAXToolkit Accordion control and dynamically adding panes to it based on a query of the database. For example:

Jane logs in and pulls up the page with the accordion on it. In the database she has five rows in the todo_list table. So, I need to dynamically generate five panes that contain the info. from the table…but if Joe logs in he may have only three rows, and Josh may have fifteen – so I can never know how many an individual will have beforehand.

So, I need some way to dynamically name the variables (or is there another way to do this). For example, here is some pseudo-code of what I’m trying to accomplish:

Dim i as integer
For each row in todo_list
   Dim ap + i as New AccordionPane
   Add some info from the row to the pane
Next
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T08:43:32+00:00Added an answer on June 5, 2026 at 8:43 am

    You don’t need to create new variable names. You can simply add the newly created AccordionPane object to another object (like a List)

    EDIT: Seeing as how the AccoridonPane is a managed control, I would suggest using a PlaceHolder control to hold your Accordion control, dynamically add AccordionPanes to the Accordion control and then add the Accordion to the PlaceHolder:

    Dim accordion as New AjaxControlToolkit.Accordion    
    
    For each row in todo_list
        Dim ap as New AjaxControlToolkit.AccordionPane
        'Add the row data to the AccordionPane
    
        accordion.Panes.Add(ap)
    Next
    
    'placeHolder is the id of your PlaceHolder control on the page.
    placeHolder.Controls.Add(accordion) 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using tabcontainer control of Ajaxtoolkit.I want to load aspx page for each
I tried using this example: http://www.asp.net/ajaxlibrary/AjaxControlToolkitSampleSite/modalpopup/modalpopup.aspx <ajaxToolkit:ModalPopupExtender ID=MPE runat=server TargetControlID=LinkButton1 </ajaxToolkit:ModalPopupExtender> And try using
I am using c#, Microsoft AjaxToolKit. I am using ajaxToolkit:ModalPopupExtender for the login page,
I'm using a Ajax Calendar Control within a usercontrol and for one page that
I am using the AsyncFileUpload control provided by the Ajax Toolkit. I am needing
I'm using the AjaxToolkit in asp.net project c# code. I have a script managet
I am using a ajaxtoolkit to choose a color. I want to set the
I have a form that is being dynamically built depending on user selection using
I am using ajaxToolkit:CalendarExtender in my multi lingual project. The problem with this calender
I am developing a site using ASP.NET 2.0. AjaxToolKit's ModalPopupExtender is being used to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.