by Codewiz51
5. June 2009 06:43
I downloaded the Ajax control toolkit from codeplex a couple of nights ago. I spent the evening trying to integrate the Accordion control on to one of my pages to understand what might be involved with upgrading my Web site to use Ajax.
As is usual, there was a lot more work involved than I would have guessed from working with the sample web site. After about forty five minutes, I had succeeded in integrating a sample Accordion control on my Software Favorites page. As it turns out, I will need to change the underlying architecture of my web site to use Microsoft's version of AJAX.
Here are the steps I needed to perform to use the Accordion control.
- Create a bin directory and place the AjaxToolkit.dll and the localization files in the bin directory
- Add a reference to the toolkit dll in the web project
- Add a registration for the toolkit dll in the header of my web page.
- Change the web.config to know where to find the toolkit dll.
- Add a form tag with runat="server" to wrap the Accordion control. (Painful as I am not using forms or "runat" for my pages.)
- Add a script manager control to the page.
- Add the accordian tag markup.
- Add panes for the actual accordian object.
- Add the accordian control mark up for each pane.
- Change style sheet to take care of thematic elements such as fonts and colors.
- Add the AjaxControlToolkit.dll to my Toolbox. (This displays a plethora of AJAX controls in the toolbar and can be quite frightening.)
After I completed these steps (mostly through trial and lots of errors), I have to say I was pleased with the results. You'll need to scroll to the bottom of the page to view the sample accordian effects.