Home / AJAX

Ajax Control Toolkit Rating

RSS
Modified on 2010/04/16 01:00 by Stephen Walther Categorized as Uncategorized
The Rating control provides an intuitive rating experience that allows users to select the number of stars that represents their rating. The page designer can specify the initial rating, the maximum rating to allow, the alignment and direction of the stars, and custom styles for the different states a star can have. Rating also supports a ClientCallBack event that allows custom code to run after the user has rated something.

Rating Server Properties

The properties in italics are optional.

<ajaxToolkit:Rating ID="ThaiRating" runat="server"
    CurrentRating="2"
    MaxRating="5"
    StarCssClass="ratingStar"
    WaitingStarCssClass="savedRatingStar"
    FilledStarCssClass="filledRatingStar"
    EmptyStarCssClass="emptyRatingStar"
    OnChanged="ThaiRating_Changed" />
  • AutoPostBack - True to cause a postback on rating item click.
  • CurrentRating - Initial rating value
  • MaxRating - Maximum rating value
  • ReadOnly - Whether or not the rating can be changed
  • StarCssClass - CSS class for a visible star
  • WaitingStarCssClass - CSS class for a star in waiting mode
  • FilledStarCssClass - CSS class for star in filled mode
  • EmptyStarCssClass - CSS class for a star in empty mode
  • RatingAlign - Alignment of the stars (Vertical or Horizontal)
  • RatingDirection - Orientation of the stars (LeftToRightTopToBottom or RightToLeftBottomToTop)
  • OnChanged - ClientCallBack event to fire when the rating is changed
  • Tag - A custom parameter to pass to the ClientCallBack