Open a web site

I'm have a problem with a hyperlink that I create a run-time. I'm displaying records from a database search one field is the clients web url. I can create the link fine, but when you click the link the server try to find the page on the current server.

This is the code I'm using to create the link "<a href ='<%# container.dataitem("internet")%>'><%# container.dataitem("internet")%>". The link on the status bar look like thishttp://localhost/doc/www.domain.com/.

Thank for any help.
Jeff

[644 byte] By [ZO6] at [2007-12-16]
# 1
Looks like you need to add http:// to your webform.

ie:

<a href =' http://<%# container.dataitem("internet")%>'><%# container.dataitem("internet")%>
Another solution would be to change your db so the http:// is included in the url.

TylerFrugia at 2007-9-9 > top of Msdn Tech,.NET Development,ASMX Web Services and XML Serialization...
# 2
The URL is pointing to "localhost" so that probably explains why the link is going to the "current" server. Are you sure that the URLs you are getting out of the database are correct? Should they be pointing to localhost? It looks like the real domain might currently be later in the URL path. Should www.domain.com be in the host part of the URL?

Daniel Roth

DanielRoth at 2007-9-9 > top of Msdn Tech,.NET Development,ASMX Web Services and XML Serialization...
# 3
It looks like a simple HTML issue. Here's the difference.

Look in the status bar when you link over these links

www.domain.com = <a href="www.domain.com">www.domain.com</a>

vs.

http://www.domain.com = <a href="http://www.domain.com">www.domain.com</a>
Tyler

TylerFrugia at 2007-9-9 > top of Msdn Tech,.NET Development,ASMX Web Services and XML Serialization...

.NET Development

Site Classified