title: Asp.net MVC core custom tag helper not generate output
body: <p>I implemented a custom tag helper to generate page numbers as a link. The "Process" method is triggered and the string builder has all the HTML content in it but it does not output the result on the screen. It just renders  , Could anyone help, please? </p>
  
  <pre><code>&lt;paginate page="Model.PageInfo" /&gt;
  
  
  
  [HtmlTargetElement("paginate",
       TagStructure = TagStructure.WithoutEndTag)]
      public class PaginateTagHelper : TagHelper
      {
          public PageInfo Page { get; set; }
          public override void Process(TagHelperContext context, TagHelperOutput output)
          {
              StringBuilder html = new StringBuilder();
              html.Append("&lt;div&gt;");
              for (int i = 1; i &lt;= Page.TotalPages; i++)
              {
                  var tag = new Microsoft.AspNetCore.Mvc.Rendering.TagBuilder("a");
                  tag.MergeAttribute("href", Page.PageUrl(i));
                  tag.InnerHtml.AppendHtml(i.ToString());
                  if (i == Page.CurrentPage)
                  {
                      tag.AddCssClass("selected");
                      tag.AddCssClass("btn-primary");
                  }
                  tag.AddCssClass("btn btn-default");
                  html.Append(GetTagContent(tag));
              }
              html.Append("&lt;/div&gt;");
              output.Content.SetHtmlContent(html.ToString());
          }
          private string GetTagContent(IHtmlContent content)
          {
              using (var writer = new System.IO.StringWriter())
              {
                  content.WriteTo(writer, System.Text.Encodings.Web.HtmlEncoder.Default);
                  return writer.ToString();
              }
          }
      }
  </code></pre>