Can someone show me how to do this? Let's say I have a recordset named rsItems, which pulls records from the DB. I want to list all items found in the recordset like this:
%26lt;ul class="webpower"%26gt;
%26lt;li%26gt;
%26lt;a href="#"%26gt;%26lt;img src="img/image1.gif" alt="description" /%26gt;%26lt;img src="img/photo01.jpg" alt="description" class="preview" /%26gt;%26lt;/a%26gt;%26lt;/li%26gt;
%26lt;li%26gt;
%26lt;a href="#"%26gt;%26lt;img src="img/image2.gif" alt="description" /%26gt;%26lt;img src="img/photo02.jpg" alt="description" class="preview" /%26gt;%26lt;/a%26gt;%26lt;/li%26gt;
%26lt;li%26gt;
%26lt;/ul%26gt;
That would list two static items in an unordered list in it's current fashion. What could would I need to add to make the list pull the info from the database and repeat the %26lt;li%26gt;%26lt;/li%26gt; inside the unordered list?
Thanks to anyone who can help me out here!
How do I create a repeating region in classic ASP?
%26lt;% For i = 0 to 20 %%26gt;
your HTML code here
%26lt;img src="img/image%26lt;% =i %%26gt;.gif" /%26gt;
%26lt;% Next i %%26gt;
Of course, you can use pretty much any iterative logic, not just a For loop.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment