aspnet-devexpress-dot-web-4dba7fea.md
Represents a rating control.
Namespace : DevExpress.Web
Assembly : DevExpress.Web.v25.2.dll
NuGet Package : DevExpress.Web
public class ASPxRatingControl :
ASPxWebControl,
IRequiresLoadPostDataControl
Public Class ASPxRatingControl
Inherits ASPxWebControl
Implements IRequiresLoadPostDataControl
The ASPxRatingControl class implements the functionality of a rating control, which enables end-users to rate by selecting a number of items (stars).
The ASPxRatingControl control is available on the DX.25.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" />
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;
}
Imports DevExpress.Web
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
Dim ratingControl As ASPxRatingControl = New ASPxRatingControl()
ratingControl.ID = "ratingControl"
Page.Form.Controls.Add(ratingControl)
ratingControl.Value = 4
End Sub
Note
DevExpress controls require that you register special modules, handlers, and options in the Web.config file. You can change this file or switch to the Design tab in the Microsoft Visual Studio IDE to automatically update the Web.config file. Note that this information is automatically registered if you use the DevExpress Template Gallery to create a project.
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 ASPxClientRatingControl object. The control’s client-side API is enabled if the ASPxRatingControl.ClientInstanceName property is defined or any client event is handled. Available client events can be accessed via the ASPxRatingControl.ClientSideEvents property.
Show 14 items
Object Control WebControl ASPxWebControlBase ASPxWebControl ASPxRatingControl MVCxRatingControl
See Also