title: HtmlHelper class in System.Web.Webpages.Html vs System.Web.Mvc namespaces
body: <p>In ASP.NET MVC3 I'm trying to set the css class that the validation error helper method sets. (Not <a href="https://stackoverflow.com/questions/8733857/mvc-3-override-validation-message-css">this question</a>, the accepted answer just ADDS the class, I want to override it completely.) In looking at the MVC3 source I've found the <code>ValidationInputCssClassName</code> property on the HtmlHelper class. It is settable and it stores the value in a storage provider if set. The get method for the property returns [the provider value] <code>??</code> [the default class name].</p>
  
  <p>Now if you just type in <code>HtmlHelper.ValidationInputCssClassName</code> (<a href="http://msdn.microsoft.com/en-us/library/system.web.mvc.htmlhelper.validationinputcssclassname.aspx" rel="nofollow noreferrer">MSDN entry</a>) in your controller code you'll see that it is a static readonly field. The reason for this is that there are two HtmlHelper classes, one is in the <code>System.Web.Mvc</code> namespace, and the other is in the <code>System.Web.Webpages.Html</code> namespace. The property <code>System.Web.Webpages.Html.HtmlHelper.ValidationInputCssClassName</code> (<a href="http://msdn.microsoft.com/en-us/library/system.web.webpages.html.htmlhelper.validationinputcssclassname%28v=vs.99%29.aspx" rel="nofollow noreferrer">MSDN entry</a>) can be set, but it doesn't seem to have any effect the generated code no matter where I set it.</p>
  
  <p>What am I missing? And what is the difference between these classes?</p>