title: How to define function that returns html in asp.net core
body: <p>Basically I need something like old asp.net</p>
  
  <pre><code>@helper MakeNote(string content) {
      &lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;&amp;nbsp;&amp;nbsp; @content    &lt;/p&gt;
  }
  </code></pre>
  
  <p>or JSX</p>
  
  <pre><code>MakeNote(note) {
     return (&lt;div&gt;Note {note}&lt;/div&gt;);
  }
  </code></pre>
  
  <p>A partial view is not an option. I am happy with either a function returning an IHtmlString, or a function writing to the underlying writer.</p>
  
  <p>It also needs to support Razor Syntax (not just string concatenation) inside the function.</p>