title: Create Dynamic Razor HTML
body: <p>How can I create dynamic Razor lines like:</p>
  
  <pre><code>@{
      string atr = "MyAttribute";
      string s = "@Html.DisplayFor(modelItem =&gt; item.Type.Word." + atr + ")";
  }
  </code></pre>
  
  <p>and make these lines to be rendered as Razor lines?</p>
  
  <p>I tried:</p>
  
  <pre><code>@(new HtmlString(s))
  </code></pre>
  
  <p>and</p>
  
  <pre><code>@Html.Raw(s)
  </code></pre>
  
  <p>But no luck with that.</p>