Ready for AJAX within your DotNetNuke Portal?
Overview of AJAX
After the success of the “Atlas” CTP program and the Beta and Release Candidate versions Microsoft officially launched ASP.NET Ajax. This is now the current package that is available and it provides the foundation for all ASP.NET Ajax implementations. Since the release of version 1.0 Microsoft has also released a toolkit called “ASP.NET Ajax Control Toolkit” which is a further extension of the ASP.NET Ajax 1.0 framework. The control toolkit provides you with additional controls that help accomplish advanced user interface actions. Some examples include: Modal Popup, Minimizing Panels, and many other controls.
AJAX Toolkit Controls
The good news for DotNetNuke developers is that Microsoft made it easy for you to use the framework and toolkit and DotNetNuke made it even easier to use in your modules. When DotNetNuke 4.5.0 was released on April 6th 2007, support was built in for ASP.NET Ajax allowing developers to quickly use the tools within their modules. DotNetNuke provides two different methods to implement Ajax in your module; automatic wrapping of a module in an “Update Panel” control, or module specific Ajax implementation.
The first method of DotNetNuke Ajax implementation is very simple. If you have a control within a created module you can simply modify the module definition for that control and select the “Supports Partial Rendering” option. For an example below we will walk through the steps necessary to enable partial rendering for the “Documents” module settings page.
- Login to your DNN site as the host
- Select “Module Definitions’ from the “Host” menu
- Select “Edit” next to the “Documents” module
- Scroll to the bottom of the next page and select “Edit” next to “Settings”
- Place a checkbox in the “Supports Partial Rendering?” checkbox then click update
- Now, if you view the “Settings” page for the documents module you will notice that when clicking on various items that the changes will simply occur and there is no page flicker or need to re-scroll to your previous location
This method allows you to quickly implement Ajax for your module; however, it has its limitations that might not allow your control to function correctly. To help provide more robust features DotNetNuke has provided various Ajax specific methods to allow you to have granular control over your module and what controls will use Ajax and which will use the standard post back methods.