Ratings can be added to any page or blog post by adding the Page Rating control to the page template and enabling or disabling ratings within the CRM (See Page Ratings).  Ratings can also be enabled for Comments on web pages or blog posts The Rating control is a composite user control that consists of several related controls. In our sample portals, there are several ASP.NET User Controls that can be included in your project and added to your page templates to provide page comments. The custom User Controls can be found in the sample User Group Portal.

Adding Page Ratings

  • Add the following declaration to your page template
<%@ Register src="~/Controls/MultiRatingControl.ascx" tagname="PageRating" tagprefix="adx" %>
  • Add the following control declaration to your page template to the appropriate location you would like the rating to be rendered.
<adx:MultiRatingControl runat="server" /> 

MultiRating Control Properties

The control has the following properties that modify the behavior.

NameDescription
RatingType 

One of the following

  • "rating" - Displays a rating scale which allows the users to rate based on a numeric scale or 'star rating'. This is the default setting.
  • "vote" - Displays a vote mechanism which allows the users to vote similar to like or dislike.
 
EnableRatings

Boolean value can enable or disable ratings

SourceID

Used to pass in the entity ID of the CRM entity for which the MultiRatingControl will render ratings.  Only neccessary when placing the control in the ItemTemplate of a databound list or grid control; otherwise the control will render ratings for the entity represented by the current node in the sitemap (the web page or blog post).

LogicalName

The Logical Name of the entity for which the MultiRatingControl will render ratings. Only neccessary when placing the control in the ItemTemplate of a databound list or grid control; otherwise the control will render ratings for the entity represented by the current node in the sitemap (the web page or blog post).

RatingInfo

Used to bing the RatingInfo of the rating control to the item databound in the itemTemplate of a ListView.  Used to implement ratings for comments.  See the User Group Portal for examples.

InitEventName

Only neccessary when placing the control in the ItemTemplate of a databound list or grid control; in this case the recommended value is "OnDataBinding"