Showing posts from January, 2013

Create and Retrieve a Social Rating

The SocialRatingManager object enables you to create a social rating for any specified URL. Because entries in Microsoft SharePoint Server lists and document libraries can be represented by URLs, you can create and retrieve social ratings for those items, and for any other SharePoint Server page. This topic demonstrates how to use the SocialRatingManager to create and retrieve social ratings and how to enable social ratings on a SharePoint Server in a custom application. The samples in this topic assume that you have added the following references to your Microsoft Visual Studio 2010 project:





Creating Social Ratings

The overloaded SetRating method creates a single SocialRating object for the current user on a single specified URL. A social rating consists of a URL and an integer ranging from 0 through 5. It also can optionally consist of a string title for the rating and a FeedbackData object …

Add Rating to sharepoint list on site collecion using power shell


 $site = New-Object Microsoft.SharePoint.SPSite("http://sitecollection URL") 
 if ($web -ne $Null) 
       if ($PagesList -ne $Null) 
             Write-Host " Processing List : " $PagesList.Title 
             If ($ct -ne $null) 
                   Write-Host " Adding Rating columns to content type : " $ 
                   $AverageRatinglink = new-object Microsoft.SharePoint.SPFieldLink $AverageRating 
                   $RatingCountLink = new-object Microsoft.SharePoint.SPFieldLink $RatingCount…

Create Rating Visual Web Part Using Visual Studio 2010,

Create Rating Visual Web Part Using Visual Studio 2010,  also Apply Rating Settings using c#

  Back End Design
 Register Assembly

 <%@ Register Tagprefix="SharePointPortalControls" Namespace="Microsoft.SharePoint.Portal.WebControls" Assembly="Microsoft.SharePoint.Portal, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>

Add Control.

<div>    Average Ratting :
   <SharePointPortalControls:AverageRatingFieldControl ID="PageRatingControl" runat="server"/>