Thursday, April 23, 2009

Installing AJAX Control Toolkit in Visual Studio 2008 SP1

I found it a bit frustrating to figure out what I needed and how to setup everything to use the AJAX Control Toolkit. Here is what I learned.

Since ASP.NET AJAX is built into ASP.NET 3.5 and ASP.NET 3.5.1(which is part of Visual Studio 2008 and Visual Studio 2008 SP1 respectively), you don’t need to download or install anything else when usual Visual Studio 2008 SP1, except the Toolkit itself. It is NOT included with any Visual Studio. You MUST download the toolkit itself.

Click here to go to the download page. It is important to get the correct version of the toolkit since it has one for each version of Visual Studio. In particular, there is a version for Visual Studio 2008 (Original Release) and another version for Visual Studio 2008 SP1. To download click one of the four links under the Downloads & Files section on the page. I recommend the AjaxControlToolkit-Framework3.5SP1-NoSource.zip link if you don’t need the source, and just want to use the toolkit. This is the kind of installation you would typically get with any other third party control library.

Figuring that out was the hard part for me. I’m sure there is some document out there that explains all this, but I only found clues in different places.

Now that you have the file, unzip it to a location on your hard drive. You will then need to run the installer. Depending on where you unzipped the file, the installer is located at a path similar to the following:

C:\AjaxControlToolkit-Framework3.5SP1-NoSource\AjaxControlExtender\AjaxControlExtender.vsi

The project template never shows up in Visual Studio, so I don’t know what the installer actually did. I would love to hear what other people experience.

Open Visual Studio 2008 SP1 and add a tab to the Toolbox for the AJAX Toolkit controls by right-clicking on the Toolbox .

Add the toolkit controls to the tab by right-clicking the area below the tab label. Choose the Choose Items…. menu item. Browse to the AjaxControlToolkit.dll assembly.

The DLL for controls that you will use is located in the SampleWebSite\Bin directory. The path should be similar to:

C:\AjaxControlToolkit-Framework3.5SP1-NoSource\SampleWebSite\Bin\AjaxControlToolkit.dll

The AJAX Control Toolkit controls are now available just like any other server control.

NOTE: If you don’t have a project open and the active file (in your main window) is a web page or user control, etc, you won’t see the controls because Visual Studio only shows the controls in the proper context like editing a web page.

References

21 comments:

El said...

If you don't see the controls after adding them to the tab that you created, try changing your web project's target framework property to 3.5.

Brent V said...

El,

Sounds like a good tip. Thank you.

Brent

Anonymous said...

Excellent, thank you.

Brent V said...

Anonymous,

Thank you for your feedback! I really appreciate it!

Thx!

Brent

Raunak said...

Great help, Thanks.

Brent V said...

Raunak,

Glad to help. Thank you for the kind feedback.

Brent

T - eazy said...

d@MN that was good. Problem solved

Brent V said...

T - eazy,

Glad it helped. Thank you for the kind feedback.

Brent

Marshall said...

Thanks Brent got me on the right path.

When I added the the toolkit dll to the tool tab it actually created another tab called "AjaxControlToolkit Components" so I deleted the tab I added.

Brent V said...

Marshall,

So glad it was helpful. Thank you for the kind feedback.

Brent

Chi said...

Not sure why, but I can't drag the "extender" controls, for example, when I try to drag the RoundedCornersExtender, I just get the "can't" symbol. Any clues??? Thanks!

Brent V said...

Chi,

I have not run into that exact problem. However, but check to make sure the control reference has been added to the top of the page. Also, make sure you have the assembly added to your project. You can also make sure that in your bin directory that the ajax tool kit assembly is there.

I hope that helps.

Brent

Chi said...

Issue solved -- Just found out that you can't drag extender controls to the form, but you can add extenders to existing controls.

Brent V said...

Chi,

Thank you for the update. I'm glad you were able to figure it out.

Brent

Susie said...

Thanks mate, you have given a miracle morning that my ajax finially got injected into my V.S 2008...whahaha...Merry Christmas!

Brent V said...

Susie,

So glad that it helped!

Thx for the feedback. Always appreciated.

Brent

Q said...

Thank you!!! I'm not sure why there isn't better documentation online for this installation..

Brent V said...

Q,

I guess they think it is obvious or something. :) It wasn't to me. I'm glad you found this useful. Thanks for the feedback.

Brent

Anonymous said...

Thanx a lot man, I tried to accomplish this for two days, you're the man!!!

kapil said...

Excellent, Thank you i will try to solve the issue.

aparna john said...

Hi,If you have a products page you can simply test different formats of the page. Once you stop the test for Web Design Cochin, you can then see which web design achieved the higher results. Often times a small difference to a page can make a massive difference to the effectiveness of it.Thanks..........