This walkthrough describes the steps for creating a basic Web Part that supports ASP.net AJAX that you can add to a Web Part Page. This example creates a SayHello Web Part that is used in a Windows SharePoint Services 3.0 Web site that derives from the ASP.net 2.0 WebPart class (system.web.u in the ASP.net class library) I.webcontrols.webparts namespace).
Prerequisite
Windows SharePoint Services 3.0
Visual Studio 2005
Step 1: Create a WEB part project
To create a WEB parts control that supports AJAX, you can first create a class library object in the class library in Visual Studio 2005.
To create an ASP.net Web part project in Visual Studio 2005
Start Visual Studio 2005.
On the File menu, point to New, and then click Project.
Under Visual Basic or C # in project type, select Windows.
In the Templates pane, select Class Library.
Type Sample.sayhello as the project name.
Step 2: Rename the base class and add the required namespaces
After the project is created, a blank class file is displayed. You can change the default class name "Class1" to easily identify new WEB parts. A class library project contains only a small number of namespaces. You need to add two required namespaces and references to their assemblies. You must also derive the base class from System.Web.UI.WebControls.WebParts.WebPart. Then, you must add two global variables to update the user interface (UI).
Adding namespace references and shared user interface components
Rename the default class in the following ways: In Solution Explorer, select Class1.cs, right-click, click Rename, and then type Sayhellowebpart as the file name.
On the Project menu, click Add Reference.
In the Add Reference dialog box, on the. NET tab, select System.Web.Extensions and click OK.
Repeat steps 2 and 3 for the System.Web namespace.