Customization of Portal with SharePoint Part I: Deploy your own Web Part

Portal with SharePoint as name suggests is built on top of Microsoft SharePoint. Choosing to use Portal with SharePoint will provide schools an opportunity to deploy other SharePoint features and use them with out-of-the box product. The basic customization can be done on SharePoint itself or via SharePoint Designer which is free utility available from Microsoft. The customization that I will cover here are the next level of customization where you want to present student/staff user with rich set of added functionality.

Any custom Web Part or Application Page deployed on same Web Application share the session items and claim items with Portal with SharePoint. This way you can write your code on top of existing information from session/claim. In this post we will try to provide personalized list of today’s classes to logged-in user.

Step 1: Create Web Part

You can create and customize a web part by adding a Web Part item to any SharePoint project and then editing the code file for the web part. This link from MSDN has steps for creating and deploying custom web part:

When creating a new item in project via above link you will see 2 options for creating a Web Part: Basic and Visual Web Part. For purpose of this article select ‘Visual Web Part’.

Step 2: Add custom code in Web Part

Once the Web Part is created you can add desired custom code. We will assume that we have a service which is returning today’s class schedule for logged in student.

Good thing about having Web Part co-deployed with other Portal with SharePoint component is you have access to all the Session and Claim items. So, your Web Part does not have to worry about where and how to get StudentID it does not have to worry about authenticating the user. Your Web Part will be about the business functionality you want to add. In this example I am using the SudentID from session.


Step 3: Deploy the custom Web Part to

For local testing, you can deploy the Web Part directly from Visual Studio. Check out this link to deploy the Web Part properly in other environments:

Login as Admin to the Portal and ensure that the Web Part is available in Web Part Gallery. If you do not see Web Part in Web Part Gallery after successful deploy then follow the steps described in this link:

Step 4: Configure Web Part

Once Web Part is available in Web Part Gallery you can edit the Web Part to properly configure all the values. One of the Portal specific thing you can do is you can limit the access to this Web Part for Staff, Student or Employer. You can modify the group property of Web Part as ‘Stud’, ‘Staf’ or ‘Empl’ respectively to achieve that. Here is how the property of Sample Web Part we created looks like.

WebPart Configuration



Step 5: Test!

Now you can go to the home page in Portal and add the custom Web Part by clicking on ‘Add a Widget’ button. Here is how the Web Part we just created looks like.

Home Page with WebPart

Next: Customization of Portal with SharePoint Part II: Deploy Custom Application Page

-tushar ~tas

Leave a Reply

Skip to toolbar