title: How to add Class attribute into Custom Html Helper in MVC?
body: <p>I want to add <code>Class</code> into my Custom Html Helper. I am creating a Html Helper for Image.
  I got confused how to add class into custom html helper.</p>
  
  <p>Any suggestion is highly appreciated.</p>
  
  <p>I want helper method for this scenario.</p>
  
  <pre><code>&lt;img src=@model.Path alt="Image" class="img-thumbnail" style="height:20px; width:30px;"&gt;
  </code></pre>
  
  <p>Code</p>
  
  <pre><code> public static IHtmlString Image(this HtmlHelper helper, string src, string alt,string height, string width)
          {
              TagBuilder tb = new TagBuilder("img");
              tb.Attributes.Add("src", VirtualPathUtility.ToAbsolute(src));
              tb.Attributes.Add("alt", alt);
              tb.Attributes.Add("height", height);
              tb.Attributes.Add("width", width);
  
              return new MvcHtmlString(tb.ToString(TagRenderMode.SelfClosing));
          }
  </code></pre>