I have an asp button that I am styling using CSS.
Button:
<asp:Button ID="btnClockin" runat="server" Text="Clock In" class="FullWidthButton" />
CSS:
.FullWidthButton {width:100%;}
This works fine until I set btnClockIn.Enabled = False in my code, then it doesn’t pick up the style. I tried adding the following CSS.
.FullWidthButton[disabled="disabled"]{width:100%;}
and
.FullWidthButton[disabled]{width:100%;}
but these don’t seem to have any effect. What am I doing wrong?
Change “class” to “CssClass” and it should work consistently.