Introduction It's a control in the Ajax tool kit by which you can add sections with some content separately and expand or collapse each section as needed. I will explain how to bind the Accordion with database values and add it on the page dynamically. To do it you need to create a table in your database and add some data into it for each section's header and content.To better understand, use the following procedure to create a sample.Step 1
Create a table named "BTechStudents" with 2 fields named "BranchName" and "StudentName". Step 2
Insert some data into the table.
Step 3
Download the AjaxCOntrolToolKit from the following link to use the Accordion control.And create a website named "Test_Website".Right-click on the website and choose "Add reference" to add the reference of AjaxControlToolkit.A window will be shown to add the reference. Use the following sub-steps to add the AjaxControlToolKit.
It will look as in the following bin folder:Step 4
Step 5
Now I will provide some sub-steps for creating the Accordion.
Write the following code on the Page Load event of the page and add the following namespaces to the page.
You need to be a premium member to use this feature. To access it, you'll have to upgrade your membership.
Become a sharper developer and jumpstart your career.
$0
$
. 00
monthly
For Basic members:
$20
For Premium members:
$45
For Elite members: