To add a WebPart to the SharePoint site, you have to add it
first to the SharePoint WebPart Gallery.
Adding New WebPart to the SharePoint WebPart Gallery
To do this, follow the subsequent steps.
1.
Click Site Actions tab, and select Site Settings. The Site Settings page will appear.
2.
Under gallery column, click on web parts
link. This takes you to the WebPart Gallery page.
3.
Click on the New button as shown in Figure 1,
it will move you to a new page that displays all WebParts that are included in
the sharepoint webconfig file.
Figure 1

4.
Check your webpart project name which is "TestAbdelHaqWebPart"
and then click on Populate Gallery button as
illustrated in Figure 2, which adds the WebPart to the WebPart gallery so that
you can add it later to the page.
Figure 2

Now let us go and add our new WebPart to the home page.
Adding WebPart to SharePoint page
To add our new WebPart to the home page, follow the
subsequent steps.
1. From the home page, click on Site
Actions tab and select choose Edit Page.
Figure 3

2. Click on Add a Web Part as
shown in Figure 4
Figure 4

3. From the
popup page, check "MyAjaxWebPart" and then click on Add button.
Figure 5

4. Click Exit Edit Mode.
And that is it; we have added our new WebPart to the home
page of our SharePoint website.
Type the name that you want to search and click the search
button. Notice that the Loading image will be displayed and the result will be
represented inside the GridView.
So no post back, no flashing on the page, which is what we
are talking about, "Ajax WebPart." It represents what is called
Progress Indicator, which helps in maintaining the user's attention and
communicates that the system is still alive even if a response has not yet
occurred.
Figures 6 and 7 show you how Ajax WebPart works on the page.
Figure 6

Figure 7
