Display clickable link coming from the database

Asked

Viewed 74 times

1

I want to display the Link that can be clickable, is appearing as text:

inserir a descrição da imagem aqui

I’m using the code below, but it still comes as text and I can’t click:

@Html.Raw(HttpUtility.HtmlDecode(item.Facebook))
  • The answer solved your problem Fabio Souza ??? Do you have any bigger questions ??? , Do you want other tips ??? , I await any comment.

1 answer

0

Place:

<a href="@HttpUtility.HtmlDecode(item.Facebook)">Texto do Link</a>
  • 1

    Thanks for the reply @Virgilio I ended up doing the reverse, saving concatenei client.Facebook = "<a href=\""+facebook+"\" target=\"_blank\">Facebook</a>"; but I’ll try to do as you said, the end I think it would be easier to just load the link from the database and in the view concatenate the content.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.