I have been doing a bit of work updating some fairly complex sites to use the AJAX Toolkit v3.5.51116 (Nov 2011) with DotNetNuke 5.X. In doing so, I've noticed that there is one additional step which needs to be carried out and this is the addition of the following line in the code-behind of Default.aspx.
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
HttpContext.Current.Items.Add("System.Web.UI.ScriptManager", True)
Without this line, DNN won't think the ScriptManager has been added meaning DotNetNuke.Framework.AJAX.IsEnabled will return False. This will potentially break any screens which carry out conditional logic based on this property.
In summary therefore, the steps needed to get DNN 5.X to work with the AJAX Toolkit v3.5.51116 are the following:
1. Add the following lines to Default aspx:
<%@ Page Language="vb" AutoEventWireup="false" Explicit="True" Inherits="DotNetNuke.Framework.DefaultPage" CodeFile="Default.aspx.vb" %>
<%@ Register TagPrefix="dnn" Namespace="DotNetNuke.Common.Controls" Assembly="DotNetNuke" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
<asp:literal id="skinDocType" runat="server"></asp:literal>
<html<%= HtmlAttributeList %>>
<head id="Head" runat="server">
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
<meta content="text/javascript" http-equiv="Content-Script-Type"/>
<meta content="text/css" http-equiv="Content-Style-Type"/>
<meta id="MetaRefresh" runat="Server" http-equiv="Refresh" name="Refresh" />
<meta id="MetaDescription" runat="Server" name="DESCRIPTION" />
<meta id="MetaKeywords" runat="Server" name="KEYWORDS" />
<meta id="MetaCopyright" runat="Server" name="COPYRIGHT" />
<meta id="MetaGenerator" runat="Server" name="GENERATOR" />
<meta id="MetaAuthor" runat="Server" name="AUTHOR" />
<meta name="RESOURCE-TYPE" content="DOCUMENT" />
<meta name="DISTRIBUTION" content="GLOBAL" />
<meta id="MetaRobots" runat="server" name="ROBOTS" />
<meta name="REVISIT-AFTER" content="1 DAYS" />
<meta name="RATING" content="GENERAL" />
<meta http-equiv="PAGE-ENTER" content="RevealTrans(Duration=0,Transition=1)" />
<style type="text/css" id="StylePlaceholder" runat="server"></style>
<asp:placeholder id="CSS" runat="server" />
</head>
<body id="Body" runat="server" >
<dnn:Form id="Form" runat="server" ENCTYPE="multipart/form-data" >
<asp:ToolkitScriptManager ID="ScriptManager" runat="server"></asp:ToolkitScriptManager>
<asp:Label ID="SkinError" runat="server" CssClass="NormalRed" Visible="False"></asp:Label>
<asp:PlaceHolder ID="SkinPlaceHolder" runat="server" />
<input id="ScrollTop" runat="server" name="ScrollTop" type="hidden" />
<input id="__dnnVariable" runat="server" name="__dnnVariable" type="hidden" />
</dnn:Form>
</body>
</html>
2. Add the following line to Default.aspx.vb:
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
HttpContext.Current.Items.Add("System.Web.UI.ScriptManager", True)
Note: Following the above changes, there is really no point in any custom code calling DotNetNuke.Framework.AJAX.RegisterScriptManager() as in effect the ScriptManager is being forced into every page anyway as result of the changes above.