I've got a Razor list-to-view function setup and i render a website url that a user inputs. My problem is that at the moment clicking the url causes the anchor to try and find that page within the website, when it's an external link.
How do i do this?
My code with the rendered URL:
<div id="PageDetails">
<h2> @artist.ArtistName </h2>
<p><strong>Website:</strong> <a href="@artist.ArtistWebsite">@artist.ArtistWebsite</a></p>
<p><strong>Bio:</strong> @Html.C1().Body(artist.ArtistBio)</p>
@if (!string.IsNullOrEmpty(artist.Image))
{
<img src="@Html.C1().MediaUrl(artist.Image)" /><br />
}
</div>
The URL in the data type field should start with http://:
Use 'http://www.xyz.com' rather than 'www.xyz.com'