Latest Lists

How do I create a repeating region in classic ASP?

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: <ul class="webpower"> <li> <a href="#"><img src="img/image1.gif" alt="description" /><img src="img/photo01.jpg" alt="description" class="preview" /></a></li> <li> <a href="#"><img src="img/image2.gif" alt="description" /><img src="img/photo02.jpg" alt="description" class="preview" /></a></li> <li> </ul> 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 <li></li> inside the unordered list? Thanks to anyone who can help me out here!

Public Comments

  1. <% For i = 0 to 20 %> your HTML code here <img src="img/image<% =i %>.gif" /> <% Next i %> Of course, you can use pretty much any iterative logic, not just a For loop.
Powered by Yahoo! Answers