In ASP.NET MVC3, I am trying to install a css class that installs a validation assistant method. (Not this question , the accepted answer is just an ADDS class, I want to completely override it.) When I looked at the source of MVC3, I found the ValidationInputCssClassName
property in the HtmlHelper class. It is configured and stores the value in the repository, if installed. The get method for the property returns [provider value] ??
[default class name].
Now, if you simply type HtmlHelper.ValidationInputCssClassName
( MSDN record ) in the controller code, you will see that this is a static readonly field. The reason for this is that there are two HtmlHelper classes, one in the System.Web.Mvc
and the other in the System.Web.Webpages.Html
. The System.Web.Webpages.Html.HtmlHelper.ValidationInputCssClassName
property ( MSDN record ) can be set, but it does not seem to affect the generated code no matter where I install it.
What am I missing? And what is the difference between these classes?
source share