I have a property in my .cs file basically
public string MyURL
{
get { return _myUrl; }
set { _myURL = value; }
}
This property gets the value as a string ad it would something like this www.shipco.com.
The issue I am having is when i putting it in the page as an anchor with target blank it gives it as a location in the website like http://mywebsite/www.shipco.com
This is how I am setting it on the page:
<div>
<strong>URL :</strong>
<a href="<%=MyURL%>" target="_blank"><%=MyURL%></a>
</div>
I would appreciate any help as I am learning and not sure how to achieve this.
Basics of fully qualified URLs and relative URLs in the browser:
The above means, go to the current URL, only replace the current page path with the
href. You will see that the source of the page is exactly what you expect it to be. The browser interprets it as a relative location to the current page – it doesn’t “know” it is a different website.You need to output the
http://as well:Perhaps this About.com article will shed some light.