RatingControl
The DevExpress ASP.NET MVC RatingControl extension allows users to rate web site content by clicking icons that represent ratings (“stars” by default).
To learn more about RatingControl and see it in action, refer to the online Rating Control demos.
Implementation Details
RatingControl is realized by the RatingControlExtension class. Its instance can be accessed via the ExtensionsFactory.RatingControl helper method, which is used to add a RatingControl extension to a view. This method’s parameter provides access to the RatingControl‘s settings implemented by the RatingControlSettings class, allowing you to fully customize the extension.
The RatingControl extension’s client counterpart is represented by the ASPxClientRatingControl object.
Declaration
RatingControl can be added to a view in the following manner.
@Html.DevExpress().RatingControl( settings => {
settings.Name = "ratingControl1";
settings.Titles = "1,2,3,4,5,6,7";
settings.ItemCount = 7;
settings.FillPrecision = DevExpress.Web.ASPxRatingControl.RatingControlItemFillPrecision.Exact;
}).Bind((decimal)5.66).GetHtml()
The image below illustrates the results.