SharePoint 2010 Web Parts


SharePoint 2010-Web Parts

Web Parts are rectangular areas of HTML content.  We can provide information to the users using Web Parts. The history of Web Parts starts in the year 2000 with the name Digital Dashboard.  Later it evolved as Web Parts and includes support in SharePoint Designer and Visual Studio.  We can use the existing web parts or build custom web parts for SharePoint.

SharePoint 2010 contains builtin web parts and provides custom web part integration facilities. Web Parts provides a set of controls to display, modify, and configure the contents.

Example of a Web Part

img1.jpg

Adding a WebPart

To begin, open our site collection using the URL:

img2.jpg

We can start by adding an image WebPart to the main page.  Click on the left top menu Site Actions > Edit Page option.

img3.jpg

In the screen that appears as shown below, click on the first Add a Web Part button.

img4.jpg

The following options appear:

img5.jpg

Select Media and Content from the first pane and Image Viewer from the second pane and click the Add button.  Now the Web Parts gets added into the page.

img6.jpg

Use the open the tool pane option and enter an image URL inside it; then click the Apply button.

img7.jpg

Now click the Stop Editiong button from the ribbon menu.

img8.jpg

Now you are ready with the main page with an image as shown below.

img9.jpg

Editing a Web Part

We can edit a web part by logging in as a user with permissions to edit and using the Edit Web Part option from the right side context menu of the web part.

img10.jpg

Deleting a Web Part

To delete an existing Web Part, use the Edit Web Part option from the context menu.

img11.jpg

Then use the Delete option again from the Web Part context menu.

img12.jpg

Now the Web Part is deleted.

Using List Web Parts

We can use List Web Parts to show the custom Lists made inside SharePoint. Use the Add web part option to locate the Lists and Libraries category as shown below:

img13.jpg

There we can locate the custom List created inside SharePoint. The List Web Part allows us to add the List to other sites through web parts.

Silverlight Web Part

Another notable feature in SharePoint 2010 is the Silverlight web part. Using the Silverlight web part we can now host Silverlight applications inside SharePoint.  The XAP files needed to be located for the web part. 

To add a Silverlight web part use the Media and Content category from the Add Web Part dialog as shown below:

img14.jpg

Web Part Galleries

The Web Part Gallery provides a view on the installed web parts for a site collection.  You can access this window from Site Settings > Galleries > Web Parts.

img15.jpg

On clicking the above link you can see the page as shown below:

img16.jpg

We can create our custom web part and deploy it to the SharePoint server.  These topics are discussed in advanced chapters.  The web parts will be having extension .dwp expanding as Dashboard Web Part.

References

http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webpartpages.webpart.aspx

Summary

In this article we have explored the Web Part feature, Adding/Editing/Deleting Web Parts, Silverlight Web Part, Web Part Galleries  etc. 

The key points of web parts would be:

  • A rectangular area of HTML content
  • Flexible piece of Functionality
  • Users can manage adding/deleting web parts
  • Custom web part creation is possible

Up Next
    Ebook Download
    View all
    Learn
    View all