Code
<! Doctype HTML public " -// W3C // dtd xhtml 1.1 // en " " Http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd " >
< HTML xmlns = " Http://www.w3.org/1999/xhtml " >
< Head runat = " Server " >
< Title > Ajax control rating </ Title >
< Style Type = " Text/CSS " >
. Ratingstar
{
Font - Size: 0pt;
Width: 13px;
Height: 12px;
Marging: 0px;
Padding: 0px;
Cursor: pointer;
Display: block;
Background - Repeat: No - Repeat;
}
. Filledratingstar
{
Background - Image: URL (Images / Filledstar.png );
}
. Emptyratingstar
{
Background - Image: URL (Images / Emptystar.png );
}
. Savedratingstar
{
Background - Image: URL (Images / Savedstar.png );
}
</ Style >
</ Head >
< Body style = " Text-align: Center " >
< Form ID = " Form1 " Runat = " Server " >
< ASP: scriptmanager ID = " Scriptmanager1 " Runat = " Server " />
< Div >
< ASP: updatepanel ID = " Updatepanel1 " Runat = " Server " >
< Contenttemplate >
< ASP: Label ID = " Label1 " Runat = " Server " Text = " Display result " > </ ASP: Label > < BR />
< BR />
< C0: rating ID = " Rating1 " Runat = " Server " Currentrating = " 2 " Starcssclass = " Ratingstar " Filledstarcssclass = " Filledratingstar " Emptystarcssclass = " Emptyratingstar " Waitingstarcssclass = " Savedratingstar " >
</ C0: Rating >
< BR />
< BR />
< ASP: button ID = " Button1 " Runat = " Server " Onclick = " Button#click " Text = " OK " Width = " 57px " />
</ Contenttemplate >
</ ASP: updatepanel >
< C0: rating ID = " Rating2 " Runat = " Server " Currentrating = " 2 " Starcssclass = " Ratingstar " Filledstarcssclass = " Filledratingstar " Emptystarcssclass = " Emptyratingstar " Waitingstarcssclass = " Savedratingstar " >
</ C0: Rating >
</ Div >
</ Form >
</ Body >
</ Html >