Please i am trying to generate my Url hyperlink dynamically in my MVC Application.
<a href='http://facebook.com/myPage'>Facebook</a>
The above link takes me to my facebook home page. I want to be able to change the url later on as the page name is not decided. So i tried
<a href='@Url.Action("GetFaceBookLink", "Home")'>Facebook</a>
And in my controller
public ActionResult GetFaceBookLink()
{
string facebook = repository.SystemSettings.FirstOrDefault().FacebookLink;
return this.Content(facebook);
}
My string facebook = "http://facebook.com/mypage" . I want to be redicted to my facebook home page as usal. However, when i clicked, it returns the string url in a black pagewithout redirecting . Please how do i redirect ? how do i achieve this ? Any help would be appreciated.