Нет, вам не нужно создавать CSS-файлы, для этого просто включите классы в раздел head.
<head runat="server">
<style type="text/css">
/* Rating */
.ratingStar {
//image path for ratingStar here
}
.filledRatingStar {
//image path for filledRatingStar here
}
.emptyRatingStar {
//image path for emptyRatingStar here
}
.savedRatingStar {
//image path for savedRatingStar here
}
</style>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<div>
<cc1:Rating ID="ThaiRating" runat="server" BehaviorID="RatingBehavior1"
CurrentRating="2"
MaxRating="5"
StarCssClass="ratingStar"
WaitingStarCssClass="savedRatingStar"
FilledStarCssClass="filledRatingStar"
EmptyStarCssClass="emptyRatingStar"
OnChanged="ThaiRating_Changed"
style="float: left;" />
</div>
</form>
</body>
код позади раздела
protected void ThaiRating_Changed(object sender, RatingEventArgs e)
{
Thread.Sleep(400);
e.CallbackResult = "Update done. Value = " + e.Value + " Tag = " + e.Tag;
}