Ivin Raj
Ivin Raj

Reputation: 3429

How to pass database saved link to the anchor tag by using MVC?

I have Saved a link in database and then i need to view that link in view in asp.net mvc for example https://www.google.com

<a href="@Url.Content(model.linkurl)" class="contact"> </a>

Upvotes: 0

Views: 68

Answers (1)

CodeCaster
CodeCaster

Reputation: 151586

Just print the URL:

<a href="@model.linkurl">...</a>

The @Url helpers are for links pointing into the application.

Upvotes: 2

Related Questions