Get ready for BLACK FRIDAY shopping starting in

Forums

ASP

This topic is locked

Dynamic Links

Posted 19 Nov 2004 18:24:49
1
has voted
19 Nov 2004 18:24:49 J P posted:
Hi,
I am trying to create a list of links which are dynamically generated from a repeat region.
My table fieldnames are as follows :-

PageId
Page_Title
Page_Text
Page_By
Page_Date

I want to create a list of Page Titles created using a Repeat Region which then link individually to a 'more details' page using PageId

Any suggestions?

Replies

Replied 19 Nov 2004 20:01:37
19 Nov 2004 20:01:37 Dave Blohm replied:
What's your recordset's name?

Doc
Rangewalk Digital Studios
Replied 19 Nov 2004 20:11:03
19 Nov 2004 20:11:03 Dave Blohm replied:
Nevermind, we'll assume that your recordset name is rs_mypages.

<%
while not rs_mypages.eof
response.write "<a href=""detail_page.asp?id=" & rs_mypages.fields.item("PageID".value & """>" & rs_mypages.fields.item("Page_Title".value & "</a><br>"
rs_mypages.movenext
wend
%>

This is pretty simple. If you're so inclined you can neaten things up by including <tr> and <td> tags in the appropriate places in the code.

Hope this helps. Let me know if you have questions.

Doc
Rangewalk Digital Studios

Edited by - on 19 Nov 2004 20:12:31
Replied 21 Nov 2004 14:22:51
21 Nov 2004 14:22:51 J P replied:
Thanks Dave,
That worked a treat.

Reply to this topic