Tuesday, January 1, 2008

How to use AJAX in SharePoint

The following steps on how to use AJAX in MicroSoft Office SharePoint Server (MOSS) 2007 are as follows:
  1. Since MOSS was originally designed with .NET 2 framework technology, then firstly you need to download ASP.NET 2.0 AJAX Extensions v1.0 here
  2. Install AJAX Extension v1 to the server farm that runs MOSS.
  3. Configure the web.config file on the server farm. Click here for instructions.
  4. Download SmartPart from codeplex and install SmartPart on the server farm. (check this screencast on how to install SmartPart on the server farm).

Now you can start building ASP.NET AJAX style user controls in Visual Studio 2005 and use them in SharePoint as *webparts

For more resources, click here

*Note: Web Parts are components that enable users to gather information they care about and customize the appearance of Web pages in MOSS environment. For example, visit Pageflakes website, where one Web Part might display a user's appointment calendar; another might create a graph showing current sales figures; and a third might show a list of new business topics, each of which functions as a link to a video or audio presentation. Developers can also create custom Web Part components and make them available to SharePoint users, for building customizable pages that meet their needs.

SmartPart on the other hand is a web part in MOSS that can host ASP.NET web user controls (ascx) and support AJAX extensions. SmarPart was an idea that since evolved by the SharePoint community to allo Developers to ceate .NET user controls and use them in MOSS developement by using familar design available in Visual Studio by dragging, dropping and clicking controls, instead of the whole approach of coding the UI object at run time and taking care of event handling and HTML rendering. Hence SmartPart increased development productivity.

No comments: