PDA

Click to See Complete Forum and Search --> : Displaying Hyperlink - asp


yoeddy25
Aug 24th, 2000, 04:49 AM
I have the following code which displays data from a mdb. There is a reference to a web address in the code and I would like to display this as a hyperlink on my asp page but don't know how too. Can any one help?
<%
dim RSc
set RSc=server.CreateObject("adodb.recordset")
RSc.open "Comp", "DSN=comp1"
RSc.MoveFirst
Response.Write "<TABLE ALIGN='CENTER' BORDER='0' cellspacing='2' width='700'>"
Do while NOT RSc.EOF
Response.Write "<TR><TD align='center' width='20%'><font face='verdana' size='1'>" & RSc("Product Name") & "</TD></font>"

Response.Write "<TD align='center' width='20%'><font face='verdana' size='1'><a href='" & RSc("Web Site") & "'></a></TD></font>"

Response.Write "<TD align='center' width='20%'><font face='verdana' size='1'>" & RSc("Type") & "</TD></font><TR>"
RSc.MoveNext
Loop
Response.Write "</TABLE>"
%>

Mark Sreeves
Aug 24th, 2000, 05:41 AM
What you've got looks pretty good you need the hyperlnk caption to be set as well though.


Response.Write "<TD align='center' width='20%'><font face='verdana' size='1'><a href='" & RSc("Web Site") & "'>" & RSc("Web Site") & "</a></TD></font>"

yoeddy25
Aug 24th, 2000, 06:01 AM
Cheers for the prompt reply, but still no luck. No error is generated but no text or hyperlink is either. When there is no href in the code it produces #http://www.....# I don't know if that helps at all.

Mark Sreeves
Aug 24th, 2000, 06:21 AM
If you right click and View-Source is there any error message there?

yoeddy25
Aug 24th, 2000, 07:00 AM
It was still displaying # at the beginning and end of the link, changed the field type in mdb from hyperlink to text and it works. Thanks very much for your help Mark