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 from year 2000 in 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 inbuilt web parts and
provides custom web part integration facilities. Web Parts provides set
of controls to display, modify, and configure the contents.
Example of Web Part
Adding a WebPart For starting with open our site collection using the url.
We can start by adding an image WebPart to the main page. Click on the left top menu Site Actions > Edit Page option.
On the appearing screen below, click on the first Add a Web Part button.
The following options appears:
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.
Use the
open the tool pane option and enter an image url inside it, then click the
Apply button.
Now click the
Stop Editiong button from the ribbon menu.
Now you are ready with the main page with an image as shown below.
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.
Deleting a Web Part To delete an existing Web Part, use the
Edit Web Part option from the context menu.
Then use the
Delete option again from the Web Part context menu.
Now the Web Part gets 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:
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:
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.
On clicking the above link you can see the page as shown below:
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