A
Adrienne
Hello...
I am trying to create links but using a variable.
For example....
The reference number of a photograph is represented by the variable
<#etcShortTitle> and I want to generate pages which will do the
equivalent
of :
href="http://www.test.com/ <#etcShortTitle>" if you see what I mean.
Can anyone suggest how I can incorporate the variable <#etcShortTitle>
into a href command.
I don't mind how messy it is as long as it works!
Thanks
Les
You're not clear on what you want the href to do. Do you want to go to a
page, or an anchor? What exactly is #etcShortTitle?
Assuming that you're pulling out an id out of a table, and you want to
reference that id, in ASP you could do this:
<%
While Not RsRecordset.EOF
id = trim(RsRecordset("id"))
%>
<a href="www.example.com/somepage.asp?id=<%=id%>">Some page with picture
</a>
<% RsRecordset.MoveNext
Wend
RsRecordset.Close
Set Rsrecordset = Nothing
%>
Then on somepage.asp, you would look for the id - request.querystring("id")
- in the querystring and process from there.