How to Use ASP.NET Rating Control

5 04 2008

Following steps are to follow

1. Drop an Ajax rating control on your aspx page.

2. Enable it autopostback value to true.

3. Give the essential attributes like filledstarcssclass, filledRatingStarcssClass etc. (Css is also given here , you can use your own)

<cc1:Rating ID=”Rating1″ runat=”server” CurrentRating=”2″ MaxRating = “5” FilledStarCssClass=”filledRatingStar” WaitingStarCssClass=”savedRatingStar” StarCssClass=”ratingStar” EmptyStarCssClass=”emptyRatingStar” ></cc1:Rating>
.ratingStar
{
font-size: 0pt;
width: 12px;
height: 12px;
cursor:pointer;
background-repeat: no-repeat;
}

.filledRatingStar
{
background-image: url(images/fillStar.png);
}

.emptyRatingStar
{
background-image: url(images/emptyStar.png);
}
.savedRatingStar
{
background-image: url(images/login_form_btn.gif);
}

4. Double click the control in visual studio.NET and write appropriate action which you want for control.

Advertisements

Actions

Information

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




%d bloggers like this: