The style sheets are actually applied on the client-side. (This is the reason style sheets become ineffective on browsers that do not support JavaScript.)
You can also apply style-sheets on the server-side. ASP.NET provides the Style class (in the System.Drawing namespace) for this purpose. You can create an instance of this class, set its properties, and apply the instance to multiple controls at a time.
Output
The Style class properties are applied to the Label and TextBox controls through the methods, ApplyStyle and MergeStyle. The difference between the two methods is that ApplyStyle overrides the existing properties of the control while MergeStyle does not. Hence, the back color of the Label control changes to blue, while it remains red for the TextBox control.