To add a CSS class attribute to a HTML element generated by ASP.NET MVC's Html helper methods, as above, the preferred solution is to pass a htmlAttributes object into the element class constructor -- setting the @class parameter in the object initialiser. An alternative solution would be to use...
Posted to
ASP.NET MVC
(Forum)
by
Tim Acheson
on
06-23-2009, 12:00 AM
Filed under: ASP.NET MVC, asp.net, CSS, attribute, html, form, element, Insert, class, field