Add AJAX to a SharePoint Master Page – The Short Version

You’ll want to have .Net Framework 3.5 installed on the SharePoint server (framework 4 doesn’t agree with SharePoint 2007).

Above the HTML tag add:

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>

The BODY tag should have this onload attribute:

<BODY class="body2" scroll="yes" onload="javascript:if (typeof(_spBodyOnLoadWrapper) != 'undefined') _spBodyOnLoadWrapper();">

The FORM tag should have this onsubmit attribute:

<form runat="server" onsubmit="return _spFormOnSubmitWrapper();">

Add the ToolKitScriptManager below the WebPartPages:SPWebPartManager tag:

<ajaxToolkit:ToolkitScriptManager ID="ScriptManager1" runat="server"/>

You will see “Error Rendering Control – ScriptManager1 Could not load file or assembly ‘AjaxControlToolkit’ or one of its dependencies” but you can ignore it.