Integrating ASP.NET Ajax WebPart with SharePoint 3.0
page 6 of 8
by Abdulla Hussein AbdelHaq
Average Rating: 
Views (Total / Last 10 Days): 44825/ 91

Adding New WebPart into SharePoint Site

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


View Entire Article

User Comments

Title: Mr   
Name: Dinesh
Date: 2010-11-15 5:48:03 AM
Awesome code and I feel it is the best one for understanding Ajax in Sharepoint. But one small request can u write/give the code in C#. I will be very happy if u do this favor for me. Thanks a lot.
Title: Mr   
Name: James
Date: 2010-10-02 9:57:49 AM
Awesome code, and great references too. } Really thumbs up for the code, this is the best tutorial so far!
Will study how all of this works... =)
Title: Mr   
Name: Hiep
Date: 2010-06-18 12:47:50 AM
This article is useful. thanks much
Title: Mr   
Name: Jafari
Date: 2009-10-19 8:47:26 AM
Thanks Abdulla,
could you explain how to use ajax with multiple updatepanels?
Title: Mr   
Name: ashwin
Date: 2009-02-06 12:54:08 PM
Cool stuff
Title: Mr   
Name: Daniel Partridge
Date: 2009-01-21 5:02:39 AM
This looks really good!!!!
Title: Dan   
Name: Dan
Date: 2008-12-27 9:45:50 AM
Really Liked the oninit code.
Title: mrs   
Name: Madhuri
Date: 2008-12-15 4:32:54 PM
This is really very useful. Thanks

Community Advice: ASP | SQL | XML | Regular Expressions | Windows

©Copyright 1998-2024  |  Page Processed at 2024-06-15 10:32:12 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search