Jon
Jon

Reputation: 1

How do I get ASP.NET Hyperlinks to point to different domains?

In asp.net, every link created whether html tag or asp hyperlink all end up with my domain name in them. If I programmatically create the link www.google.com it ends up as mydomainname.com/www.google.com. Is this an IIS problem? I cant figure out why this is happening

Upvotes: 0

Views: 934

Answers (2)

Steinbock
Steinbock

Reputation: 868

Just add https:// or http:// before your link.

Upvotes: 1

lkaradashkov
lkaradashkov

Reputation: 8899

There's another Stack Overflow post about this:

go to external site if it's an hyperlink

You need to prefix the external website you're linking to with "http[s]://".

Upvotes: 0

Related Questions