|
-
Aug 24th, 2000, 04:49 AM
#1
Thread Starter
New Member
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>"
%>
-
Aug 24th, 2000, 05:41 AM
#2
Frenzied Member
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>"
-
Aug 24th, 2000, 06:01 AM
#3
Thread Starter
New Member
Thanks for the reply
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.
-
Aug 24th, 2000, 06:21 AM
#4
Frenzied Member
If you right click and View-Source is there any error message there?
-
Aug 24th, 2000, 07:00 AM
#5
Thread Starter
New Member
Done - cheers for helping
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|