Quantcast
Channel: C1 CMS Foundation - Open Source on .NET
Viewing all articles
Browse latest Browse all 2540

New Post: External URLS in a razor function

$
0
0
Hi guys,

So in my Razor function i've got:
<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>
I pass in an ArtistWebsite which has the url infomation. The only problem as it stands is there it treats the url within the anchor as an internal link to a page for an artist. How can i tell it not to treat it as a local link?

Viewing all articles
Browse latest Browse all 2540

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>