Making ASP.NET AJAX and SharePoint 2007 work together

Article

Making ASP.NET AJAX and SharePoint 2007 work together

Brian Eastwood, Site Editor
ASP.NET AJAX promises to usher in the next generation of Web applications. SharePoint 2007 is touted as a top tool for enterprise collaboration and content management.

For even the mildly curious, this begs a question: Can ASP.NET AJAX and SharePoint 2007 work together? For now, the answer is "Yes, but…" with a few caveats.

More on SharePoint 2007
What SharePoint 2007 means for content management

    Requires Free Membership to View

    When you register, you'll begin receiving targeted emails from my team of award-winning writers. Our goal is to provide a unique online resource for developers, architects and development managers tasked with building and maintaining enterprise applications using Visual Basic, C# and the Microsoft .NET platform.

    Hannah Smalltree, Editorial Director

    By submitting your registration information to SearchWinDevelopment.com you agree to receive email communications from TechTarget and TechTarget partners. We encourage you to read our Privacy Policy which contains important disclosures about how we collect and use your registration and other information. If you reside outside of the United States, by submitting this registration information you consent to having your personal data transferred to and processed in the United States. Your use of SearchWinDevelopment.com is governed by our Terms of Use. You may contact us at webmaster@TechTarget.com.

The possibilities, wrote Mike Ammeraan in a blog entry called Integrating ASP.NET AJAX with SharePoint, include more powerful JavaScript libraries, Web services rendering through JSON (JavaScript Object Notification), and interactive parts.

The catch? Official SharePoint support for ASP.NET AJAX will only arrive with SharePoint 2007 Service Pack 1, Ammeraan said. This is because Microsoft shipped SharePoint 2007 while ASP.NET AJAX was still in beta. (Mary Jo Foley reports that Vista SP1 should arrive by the end of 2007.)

The lack of a Service Pack, though, need not deter developers from integrating the two technologies now, Ammerann noted. Such an integration requires three steps -- installing ASP.NET AJAX onto your server farm, extending SharePoint's web.config files and adding the ASP.NET AJAX Script Manager into your master page. Ammerann provides instructions for all three steps, along with a hint for making the Update Panel work inside SharePoint 2007.

Meanwhile, development tools for integrating ASP.NET AJAX and SharePoint 2007 are beginning to emerge in the blogosphere.

Eric Schoonover has created a base class called AjaxBasePart, which "custom MOSS [Microsoft Office SharePoint Server] Web parts can derive from and fully enables all AJAX Extensions functionality within MOSS." Additional information about AjaxBasePart, and its source code, can be found in Schoonover's blog entry, AjaxBasePart: Easy ASP.NET 2.0 AJAX Extensions 1.0 and Office SharePoint Server 2007.

More on ASP.NET AJAX
ASP.NET AJAX Learning Guide

Tip Series: Get started with ASP.NET AJAX development: Part 1  |  Part 2  |  Part 3

Jan Tielens has created a SmartPart, or SharePoint Web part, which allows developers to use ASP.NET AJAX extensions inside a Web User Control and run that control as a SharePoint Web part. Put simply, the SmartPart lets you build Ajax-style controls for SharePoint. This add-in, still in beta, can be downloaded from the SmartPart for SharePoint page on GotDotNet, and additional information and demos are available on Tielens' blog entry, SmartPart for SharePoint -- ASP.NET AJAX Support.

Daniel Larson has created the SharePoint Ajax Toolkit, which comes with SharePoint Solution Package based installer, a Refresh interval programmed into an XMLWebPart and a core framework.

Finally, Tielens offers some quick hints for using the ASP.NET AJAX Control Toolkit with SharePoint 2007.