How to use the toolkit ?

Topics: User Comments
Jan 29, 2007 at 2:33 PM
Are there any instructions about how to add the toolkit to VS2005 ?

I tried adding the AjaxControlToolkit.dll and GSAjaxControls.dll from the GSAjaxControls\SampleWebSite in the ZIP that I downloaded to the Toolbox in VS2005.

But I get an error about the file not being found.
Coordinator
Jan 29, 2007 at 5:54 PM
You should be able to add a reference to the GSAjaxControls dll to your project and use any AjaxControlToolkit dll you're already using (as long as it's the current release or newer). This just happens to be the version of the Toolkit that I originally linked against. (Which was the 10123 Prod release.) Could you take a screenshot of the error and attach it?
Jan 31, 2007 at 7:45 PM

digsy wrote:
You should be able to add a reference to the GSAjaxControls dll to your project and use any AjaxControlToolkit dll you're already using (as long as it's the current release or newer). This just happens to be the version of the Toolkit that I originally linked against. (Which was the 10123 Prod release.) Could you take a screenshot of the error and attach it?


I was able to add a reference but then I could not see how I added a control to the form. (I'm a newbie as you can probably tell).

I was expecting the controls to be available from somewhere in the toolbox - is that incorrect ?

Thanks.
Coordinator
Jan 31, 2007 at 10:50 PM
You can add the dll to the toolbox (create a new tab and drag the dll from the folder you have it in onto the new tab), which should allow you to drag the controls onto the page.

Another was is to add an assembly reference to the page:
<%@ Register Assembly="GSAjaxControls" Namespace="GSAjaxControls" TagPrefix="ajaxControls" %>
(You can change the tagPrefix to whatever you want to use.)

Then, intellisense should work fine. You'd just start with "<ajaxControls:" and it should pick up the controls and give you a list of them. You may need to close the page and re-open it before they're picked up. Also, Visual Studio seems to take a few seconds to parse the page and assemblies before the controls show up in the intellisense list.


The final way you could add them is by adding the assembly reference to your web.config file in the <system.web><pages><controls> section, you can add:
<add tagPrefix="ajaxControls" namespace="GSAjaxControls" assembly="GSAjaxControls" />

Again, you can change the tagPrefix to whatever you want to use, and this would be used with intellisense in the html markup as well. You may need to close your whole project and re-open it before the controls pick up on intellisense.

Feb 1, 2007 at 3:58 PM

digsy wrote:
You can add the dll to the toolbox (create a new tab and drag the dll from the folder you have it in onto the new tab), which should allow you to drag the controls onto the page.


I tried this method and got an error message stating:

There was an error loading types from assembly 'c:\GSAjaxControls\SampleWebSite\bin\GSAjaxControls.dll' 'Could not load file or assembly 'System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.'

Is there something I can change to add the dll to the toolbox ?


Thanks for all your help.
Coordinator
Feb 2, 2007 at 1:11 AM
Do you have ASP.Net AJAX 1.0 Installed? That would be a pre-requisite to this dll.
Feb 2, 2007 at 12:19 PM

digsy wrote:
Do you have ASP.Net AJAX 1.0 Installed? That would be a pre-requisite to this dll.


I have MS ASP.NET 2.0 Ajax Extensions and MS ASP.NET 2.0 Ajax Futures January CTP.

Coordinator
Feb 2, 2007 at 6:10 PM
Edited Feb 2, 2007 at 6:11 PM
I'd try adding a reference to System.Web.Extensions.Design to the project... See the references and web.config of the SampleWebSite project for guidance.