In my code-behind I tried to set the CssClass property of a Microsoft.SharePoint.WebControls.BooleanField field during Page_OnLoad. During a debug session I could find out, that this control's CssClass property is "ms-input" by default. I overwrote it by different class name. This field gets rendered on the page like this: <TD class="ms-formbody No-Borders" vAlign=top align=middle><SPAN dir=none><INPUT id=ctl00_m_g_6796b238_94c6_47ff_bf38_ca66daa7a0d5_ctl00_AlertFormContent1_ConfirmationField_ctl00_BooleanField title="Quality Confirmation" type=checkbox name=ctl00$m$g_6796b238_94c6_47ff_bf38_ca66daa7a0d5$ctl00$AlertFormContent1$ConfirmationField$ctl00$BooleanField><BR></SPAN></TD> As you can see SharePoint actually does not render any CSS class style on this input field type. I am wondering why the CssClass is available and set by a default value although it does not get rendered. I would like to know why
Bringing code to life is a developer's daily task to fulfill.