Blogs

Using the AJAX Control Toolkit in DotNetNuke

13 Sep

I find that web development projects are requiring more and more AJAX functionality. The bells and whistles that come with AJAX are hard things for many people to live without. One of the more common toolsets to use when working with AJAX items in the .NET environment is the ASP.NET AJAX Control Toolkit. I have found that with VERY minimal effort you can fully implement the toolkit inside a DNN installation and it can even be done WITHOUT modification to the web.config file. This blog entry will provide information on how to incorporate the ASP.NET AJAX Control Toolkit into your project. I will simply discuss the DNN implementation, I am NOT going to actually discuss the usage of any specific control.

Get the Package

Once you have obtained the Control Toolkit Files you will want to copy the AjaxControlToolkit.dll file to the bin directory of your DotNetNuke installation being used for development. This process is similar to that of implementation in a standard ASP.NET application.

Reference and Usage

To actually use the controls and build your modules you must add two references to your module. System.Web.Extensions.dll and the newly added AjaxControlToolkit.dll file. The good news is that the System.Web.Extensions.dll is ALREADY part of a DNN installation for all versions 4.6.0 and later. THe AjaxControlToolkit.dll is the new file and is the only thing that will eventually be deployed to your production environment.

Once the references have been added to your project, you can add the controls to your module(s) using the examples provided in the "Demo" of the Control Toolkit. ALl in all, obtaining the files, adding references, and working with the controls is the exact same when working on DNN modules.

Deploying to DNN

Deploying to DNN is very simple, you must simply add the AjaxControlToolkit.dll file to your .dnn file as an individual listing in the Files section and include it in the package. As it is installed the .dll will be loaded and all controls are functional. Overall the proces to include this into your project is just the same as including any other DLL file.

Design Considerations

The biggest complaint from users of the Ajax Control Toolkit with DNN is that you have multiple issues with CSS, styling, and positioning. It is very common for extenders to appear in dramatically incorrect locations. I have found that wrapping a module with a >div< tag and set its position to "relative" fixes about 99.9% of the design issues that come up with DotNetNuke and the controls.

Conclusion

Including the ASP.NET AJAX Control Tookit is a very easy process when working in DotNetNuke and doesn't result in any major modifications to a DNN site, nor does it require any "out of the ordinary" procedures from an administrative point of view. This makes it really easy for individuals to quickly add nice user interface additions, to provide interactive sites.

As always, please feel free to share you comments/feedback below. If you have specific questions please use the forums.

tags: DNN Development
comments powered by Disqus

Content provided in this blog is provided "AS-IS" and the information should be used at your own discretion.  The thoughts and opinions expressed are the personal thoughts of Mitchel Sellers and do not reflect the opinions of his employer.

Connect with Mitchel

I hope the information here has been helpful. To stay connected you can also subscribe to blog updates via email, contact Mitchel about consulting services, or reach out for assistance via CodeMendor

Content Copyright

Content in this blog is copyright protected.  Re-publishing on other websites is allowed as long as proper credit and backlink to the article is provided.  Any other re-publishing or distribution of this content is prohibited without written permission from Mitchel Sellers.