title: Net Core: Convert String to TagBuilder
body: <p>The following code converts a <code>TagBuilder</code> to a <code>String</code>.
  What is the opposite? How do I convert reverse, a <code>String</code> to a <code>TagBuilder</code>?
  Looking for a solution.</p>
  
  <p><a href="https://stackoverflow.com/questions/33667308/convert-ihtmlcontent-tagbuilder-to-string-in-c-sharp">Convert IHtmlContent/TagBuilder to string in C#</a></p>
  
  <pre><code>public static string GetString(IHtmlContent content)
  {
      using (var writer = new System.IO.StringWriter())
      {        
          content.WriteTo(writer, HtmlEncoder.Default);
          return writer.ToString();
      } 
  }       
  </code></pre>