title: Writing a class using IHtmlContent and IHtmlHelper
body: <pre><code>namespace Payroll.Web
  {
      public static class Extentions
      {
          public static IHtmlContent LabelwithStyleFor&lt;TModel, TResult&gt;(this IHtmlHelper&lt;TModel&gt; htmlHelper,
            Expression&lt;Func&lt;TModel, TResult&gt;&gt; expression)
          {
              return HtmlHelper.LabelFor(expression, new { @class = "col-sm-3 col-form-label" });
          }
      }
  } 
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/Ea8EB.png" alt="enter image description here"></p>
  
  <p>I have tried this code but it's showing error! the same format I used
  in MVC with <code>MvcHtmlString</code> and <code>HtmlHelper</code> and it works. Now i'm trying
  it in <code>asp.net core</code>. Any suggestions rather than "TagHelpers"?</p>