I am trying to allow the user to link their facebook, twitter etc and have an image for the corresponding link appear which will take them to the link stored in the database.
The problem is, instead of giving me something like “www.facebook.com” it is giving me “http://localhost:60619/User/www.facebook.com”
right now I am using to get this.
<a href="@Url.Action(@Model.Facebook)">
<img src="@Url.Content("~/Content/images/Facebook.gif")" alt="Facebook" /></a>
The Url.Action has managed to remove /User/Profile/www.facebook.com and replace is with /user/www.facebook.com but I can’t get it to be just “www.facebook.com”.
Edit: I have this figured out but thank you for the help! I just needed to add validation so that the user either enters http:// at the beginning or I will have it added on manually before it is stored.
1 Answer