title: MVC Custom HtmlHelpers best practice
body: <p>Some thoughts about writing custom html helpers.</p>
  
  <p>In our project everywhere you can find the html helpers used like this.</p>
  
  <pre><code>@Html.TextBoxFor(m =&gt; m.ApplicationSettings.ApplicationName, new { @class = "inp" })
  </code></pre>
  
  <p>We append the css class "inp" to almost every input type.
  So what I'm doing is that Im creating extended html helpers that does this for me.</p>
  
  <pre><code>@Html.ExtendedTextBoxFor(m =&gt; m.ApplicationSettings.ApplicationOwnerCompanyName)
  </code></pre>
  
  <p>I'm also creating Html helpers for our blocks of html code that are used over and over through the project.
  Example</p>
  
  <pre><code>@Html.ExtendedNotification(Model.FormPostResult)
  </code></pre>
  
  <p>Which renders error/success messages after a form has been posted</p>
  
  <p>This means that the Html helper extensions are depending on the css and markup.
  Is this good or bad? </p>
  
  <p>Am I overusing Html helpers?</p>