Wednesday, 28 August 2013

Web Part in SharePoint 2013

In this article we can explore Web Parts, which is a core visual element of SharePoint.

What is Web Part?

Web Part is a rectangular html component that can be configured in a web part zone. Web Part was originated from ASP.NET and SharePoint supports it.
Web Part helps us to include multiple contents in a single page. You can choose to have multiple lists & libraries, other web pages to be displayed in the home page.
There are 2 types of web parts in SharePoint:
  • Out-of-the-box web parts
  • Custom web parts
The Out-of-the-box web parts are built-in with SharePoint. They provide solutions to some of the common purposes like:
  1. Content Display
  2. List/Library Display
  3. Image Viewer
  4. HTML Content
  5. SQL Server Reporting Services Report Viewer
  6. Silverlight Container
Etc.
The custom web parts are those created with the help of Developers. We can use Visual Studio for creating custom web parts.

How to add a Web Part?

Now we can try adding a new web part into the page. Please follow the instructions.
Step 1: Open your site
Open you site by typing the Url in the browser: http://win2012/sites/accounting
[image]
Step 2: Click the EDIT link
We need to edit the current page for inserting web part. Click on the EDIT link as highlighted above.
After clicking EDIT click on the PAGE link on left. Now you will see more Tabs on the top.
[image]
Now you can see a new INSERT tab in the header. Plus the EDIT link is changed to SAVE & CLOSE.
The page is under edit mode.
[image]
For each site there are separate pages for Home Page, List & Library. The pages are residing in the SharePoint Server & we may customize it. Editing the page will be per-user based and it will be stored in Content Database. For high traffic web pages, the editing is not recommended as it may induce performance hits.
Step 3: Insert the new web part
Click on the INSERT tab, and then click on the Web Part icon as shown below:
[image]
You will be prompted with multiple web part options.
[image]
For time being we can use the Image web part. Click on the Media and Content group and then on Image Viewer as shown above. Click the Add button on the right hand side of the page.
[image]
Now you can see your web part in the page as shown below:
[image]

Step 4: Display Image
In order to display an image, click on the open the tool pane link in highlighted section. You may receive a confirmation box, click OK to continue.
[image]
In the appearing dialog enter a Web Url for the image and click OK button to continue. You will see the following page (depending on your image).
[image]
Step 5: Save Changes
Now click on the SAVE & CLOSE link to save changes.
[image]

Editing the Web Part

For editing the web part, you need to choose the EDIT mode of page again. Once after that click on the context menu of the web part (visible on mouse hover).
[image]
We can change the Title of the web part or the Chrome, as shown below:
[image]
Click OK button & save changes, you will see the page as below:
[image]

References

List View Web Part http://bit.ly/ZjAG7f

Summary

In this article we have explored web parts & how to add new web parts.

No comments:

Post a Comment