I am working with ASP.NET MVC 4.0.And my problem is i am not getting a way to define a color of DisplayFor html attribute.
I have a HTML.DispalyFor() which is generating dynamic checkboxes and i want to set its background color to gray.
I have tried to do that by style property but i am not getting the result.I have try below thing :
new {@class="clsColor"}
Style{
.clsColor = "backgroundcolor:gray";
}
Can any one help me out on this ?
First of all use style tags properly. You can set background color by background-color not backgroundcolor: