Hello
I'm starting a new site in which I'm looping through an ASPX repeater, pulling values from a database and formatting them. It's a vegetarian restaurant review site, if you're interested . I rank sites from 1 to 5, and want to draw an appropriate number of stars on the site based in the integer stored in the database.
My problem comes in that while I can extract the numberic value from the control, eg
I can't use this in a loop, to say, do this:
Is this possible? I can't seem to find this specific issue on the net. Or am I going the completely wrong way about this.
Thanks in advance.
I'm starting a new site in which I'm looping through an ASPX repeater, pulling values from a database and formatting them. It's a vegetarian restaurant review site, if you're interested . I rank sites from 1 to 5, and want to draw an appropriate number of stars on the site based in the integer stored in the database.
My problem comes in that while I can extract the numberic value from the control, eg
Code:
="<%#DataBinder.Eval(Container.DataItem, "Ranking")%>
Code:
<% for i = 1 to DataBinder.Eval(Container.DataItem, "Ranking")
Response.WriteLine(*)
next
Is this possible? I can't seem to find this specific issue on the net. Or am I going the completely wrong way about this.
Thanks in advance.