title: How do I use razor to make something a link conditionally?
body: <p>I have a razor view where I'm currently using code that looks something like this:</p>
  
  <pre><code>@if(Model.IsLink)
  {
      &lt;a href="..."&gt;
  }
  
  Some text that needs to appear
  
  @if(Model.IsLink)
  {
      &lt;/a&gt;
  }    
  </code></pre>
  
  <p>This works but the code doesn't feel clean. Is there a better/more accepted way of accomplishing this pattern?</p>