ASPxRatingControl Class
Represents a rating control.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v24.2.dll
NuGet Package: DevExpress.Web
#Declaration
public class ASPxRatingControl :
ASPxWebControl,
IRequiresLoadPostDataControl
#Remarks
The ASPxRatingControl class implements the functionality of a rating control, which enables end-users to rate by selecting a number of items (stars).
#Create a Rating Control
#Design Time
The ASPxRatingControl control is available on the DX.24.2: Common Controls toolbox tab in the Microsoft Visual Studio IDE.
Drag the control onto a form and customize the control’s settings, or paste the control’s markup in the page’s source code.
<dx:ASPxRatingControl ID="ratingControl" runat="server" Value="4" />
#Run Time
using DevExpress.Web;
...
protected void Page_Load(object sender, EventArgs e)
{
ASPxRatingControl ratingControl = new ASPxRatingControl();
ratingControl.ID = "ratingControl";
Page.Form.Controls.Add(ratingControl);
ratingControl.Value = 4;
}
Note
DevExpress controls require that you register special modules, handlers, and options in the Web.
The appearance of the control can be customized using the standard control properties.
Items within the control can be customized by using the following item characteristics: item images (the ASPxRatingControl.ImageMapUrl property along with the ASPxRatingControl.ItemWidth and ASPxRatingControl.ItemHeight properties), titles of items (the ASPxRatingControl.Titles property), if it is a fractional number, the way in which items are filled to represent the control’s value (the ASPxRatingControl.FillPrecision property).
The control’s value is specified via the ASPxRatingControl.Value property.
Note
The client-side equivalent of this rating control is represented by the ASPx