Page History: Ajax Control Toolkit
Compare Page Revisions
Page Revision: 2010/04/15 23:25
The Ajax Control Toolkit contains a rich set of controls that you can use to build highly responsive and interactive Ajax-enabled ASP.NET Web Forms applications. Follow the steps below to install and start using the Ajax Control Toolkit with Visual Studio:
Step #1 — Download the Ajax Control Toolkit
The first step is to download the Ajax Control Toolkit. You can download the latest version of the Ajax Control Toolkit from http://AjaxControlToolkit.CodePlex.com
Click the Downloads
tab to see the list of available Ajax Control Toolkit downloads. If you are using Visual Studio 2008 then you should pick the version of the Ajax Control Toolkit for .NET 3.5. If you are using Visual Studio 2010 then you should pick the version of the Ajax Control Toolkit for .NET 4.
Download the Binary version and not the Source version of the Ajax Control Toolkit. You should download the Source version of the Ajax Control Toolkit only when you are interested in extending the Ajax Control Toolkit.
Step #2 — Extract the Download
After downloading the Ajax Control Toolkit, you need to unblock and extract the files. Right-click the compressed file and click the Unblock button.
Next, right-click the compressed file and select the Extract All
Step #3 — Add the Ajax Control Toolkit to the Visual Studio Toolbox
The next step is to add the Ajax Control Toolkit to the Visual Studio Toolbox. Follow these steps:
- Launch Visual Studio and create a new ASP.NET Web Forms project or website. Open Default.aspx in the Visual Studio editor.
- Create a new Toolbox tab by right-clicking the Toolbox and selecting Add Tab. Name the new tab Ajax Control Toolkit.
- Right-click beneath the new tab and select the menu option Choose Items... Click the Browse button and browser to the folder where you extracted the Ajax Control Toolkit. Pick the AjaxControlToolkit.dll and click the OK button to close the Choose Toolbox Items dialog.
Adding the ToolkitScriptManager
Before you can use Ajax Control Toolkit controls or extenders in a Web Forms page, you must first add a ToolkitScriptManager to the page. Drag the ToolkitScriptManager from beneath the Ajax Control Toolkit
tab in the Visual Studio toolbox onto the Visual Studio designer surface.
Using Ajax Control Toolkit Controls
After you add the Ajax Control Toolkit to the Visual Studio Toolbox, you can use Ajax Control Toolkit controls in the same way as the standard Web Forms controls. For example, if you want to add a rich HTML Editor to a Web Forms page then you can simply drag the Editor control from the Ajax Control Toolkit
tab onto the page.
Using Ajax Control Toolkit Extenders
The majority of the controls included in the Ajax Control Toolkit are control extenders.
They are used to extend the functionality of existing Web Forms controls such as the standard TextBox control.
You can extend a control that you have added to the Visual Studio designer by selecting the control and selecting the menu option Add Extender.
From the Extender Wizard
, you can select one of the Ajax Control Toolkit control extenders such as the ColorPicker extender or the Calendar extender.