All of that logic is encapsulated in the RatingsDisplay.ascx user control.
Look at the setter for the Value property.
Code:
public double Value
{
get { return _value; }
set
{
_value = value;
if (_value >= 1)
{
lblNotRated.Visible = false;
imgRating.Visible = true;
imgRating.AlternateText = "Average rating: " + _value.ToString("N1");
string url = "~/images/stars{0}.gif";
if (_value <= 1.3)
url = string.Format(url, "10");
else if (_value <= 1.8)
url = string.Format(url, "15");
else if (_value <= 2.3)
url = string.Format(url, "20");
else if (_value <= 2.8)
url = string.Format(url, "25");
else if (_value <= 3.3)
url = string.Format(url, "30");
else if (_value <= 3.8)
url = string.Format(url, "35");
else if (_value <= 4.3)
url = string.Format(url, "40");
else if (_value <= 4.8)
url = string.Format(url, "45");
else
url = string.Format(url, "50");
imgRating.ImageUrl = url;
}
else
{
lblNotRated.Visible = true;
imgRating.Visible = false;
}
}
}
As you can see, the string for imgRating.ImageUrl is built from the series of -if- statements, and is based on the incoming setter value.
For example, let's say the Value was 2.1. That would bring you down to this branch:
Code:
else if (_value <= 2.3)
url = string.Format(url, "20");
That would create a string of "~/images/stars20.gif". That is what imgRating.ImageUrl would be set to.