What is the trick

D

Dvan

I have a field in my access DB, that is a hyperlink to an IP address.

When I display that field on my site using ASP, the link doesn't come
across.

This is displayed
162.136.133.36#http://162.136.133.36#

The code to display the field is below
response.write "<TD WIDTH=200>" & vbcrlf
response.write(rs("IP_Address"))
response.write "</TD>" & vbcrlf

Is there a workaround? I have also tried to make the field a text field
with HTTP:// in front of the rs("IP_Address") and that doesn't work either.

Thanks in advance.

Doug
 
A

Aaron [SQL Server MVP]

Don't use the hyperlink datatype! Just store 'http://162.136.133.36' in a
text(255) column. Your ASP is going to have to build a link anyway:

ip = rs("IP_Address")
response.write("<a href=" & ip & ">" & ip & "</a>")
 
D

Dvan

Aaron,

One last question, that works fine, when I click on the link, it is putting
my web server address in front of the IP address and the link won't work.

Doug
 
A

Aaron [SQL Server MVP]

Are you putting http:// in yourself? Or are you storing it? From your
initial message, it looked like you were storing "http://x.x.x.x/" not
"x.x.x.x" ... if the latter, well, you need to tell the browser that you
don't mean a folder on your machine called "x.x.x.x" so

response.write("<a href=http://" & ip & ">" & ip & "</a>")

--
http://www.aspfaq.com/
(Reverse address to reply.)
 
J

James Baker

Did you include the http in the href or is it just href=162.136.133.36? If
you include the http, it shouldn't be a problem.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top