0

Hi,
In a project I'm working on, Im supposed to display 20 track names (its a music database). Currently, Im adding the links to the tracks like so:

<a href="music/<%=rs1("artist") %>/<%=rs1("album") %>/<%=rs1("tno1") %>%20<%=rs1("Track1") %>.<%=rs1("ext") %>"><%=rs1("Track1") %></a><br>

This same line is repeated 20 times, with the number1 being replaced by 2, 3, 4, 5......till 20. Is there a loop which I can use such that the line above displays 20 times without having to type these 20 lines ?
Thanks

3
Contributors
2
Replies
3
Views
12 Years
Discussion Span
Last Post by zippee
0

I would use a 2d array then do

for varCounter = 1 to 20
blahblahblah rs(varcounter)("artist") blahblahblah rs(varcounter)("album")

0

You may use the below:

<%
url = "music/" & rs1("artist") "/" & rs1("album") & "/" & rs1("tno1") & "/" & rs1("Track1")
%>

If the url varaibles may change, then you can integratecampkev code to the above.

And you links will become:
<a href="<%=url%>">Track Name</a>

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.