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.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s