Render string to html in MVC
<p>A similar question was already asked <a href="https://stackoverflow.com/questions/15548797/how-to-render-html-string-in-asp-net-mvc">here</a> but the answer did not solve my problem below.</p>

<p>How can I render a string to html?  Basically, I need to pass a string to the view that has an "a" tag definition in it.  What I want is to render it as an actual html link that is clickable.</p>

<p>View Model (simplified):</p>

<pre><code>public class MyViewModel
{
    public string MyLink { get; set; }
}
</code></pre>

<p>In Controller (simplified):</p>

<pre><code>public IActionResult Index()
{
    MyViewModel model = new MyViewModel();

    model.MyLink = "&amp;lt;a href=&amp;quot;http://www.google.com&amp;quot;&amp;gt;http://www.google.com&amp;lt;/a&amp;gt;"

    return View(model);
}
</code></pre>

<p>In View (at first line): </p>

<pre><code>@model MyNamespace.ViewModel.MyViewModel
</code></pre>

<p>Then below, these html markups (1st lines after the numbers) displays the results (2nd lines).  But none of them are actual links that you can click on.</p>

<pre><code>1
@Model.MyLink
&amp;lt;a href=&amp;quot;http://www.google.com&amp;quot;&amp;gt;http://www.google.com&amp;lt;/a&amp;gt;

2
&lt;pre&gt;@Html.Raw(@Model.MyLink)&lt;/pre&gt;
&lt;a href="http://www.google.com"&gt;http://www.google.com&lt;/a&gt;

3
@Html.Encode(@Html.Raw(@Model.MyLink))
&amp;amp;lt;a href=&amp;amp;quot;http://www.google.com&amp;amp;quot;&amp;amp;gt;http://www.google.com&amp;amp;lt;/a&amp;amp;gt;

4 
@Html.Encode(@Model.MyLink)
result same as #3.
</code></pre>

<p>Any help will be appreciated.  Thanks in advance.</p>