4.8
For applications that target .NET Framework 4.7.2 and earlier versions, xref:System.Web.UI.WebControls.CheckBox.InputAttributes?displayProperty=nameWithType and xref:System.Web.UI.WebControls.CheckBox.LabelAttributes?displayProperty=nameWithType that are programmatically added to a WebForms xref:System.Web.UI.WebControls.CheckBox control are lost after postback. For applications that target .NET Framework 4.8 or later versions, they are preserved after postback.
For the correct behavior for restoring attributes on postback, set the targetFrameworkVersion
to 4.8 or higher. For example:
<configuration>
<system.web>
<httpRuntime targetFramework="4.8"/>
</system.web>
</configuration>
Setting it lower, or not at all, preserves the old incorrect behavior.
T:System.Web.UI.WebControls.CheckBox
ASP.NET