One important method you can use for customizing your applications is changing the style of a Web form or the controls it contains. This demands knowledge of cascading style sheets, CSS, which you can pick up in a book such as the HTML Black Book (Coriolis Group, 2000). To handle styles, you can use the Style property of Web forms and Web server controls.
For example, in the Controls example on the CD-ROM, I change the background color of the displayed text box by accessing the background color part of its style as TextBox1.Style("BACKGROUND-COLOR"). In the Controls example, I set the text box's background color to aqua this way (this works because "aqua" is a predefined color in the Internet Explorer):
You can see the result in Figure 15.4 (although the aqua background isn't very evident in the black-and-white figure).
In this way, you can change all style attributes of controls. (For an example, refer to the topic "Moving Controls" in this chapter to see how to set the position of controls using styles.)
You can set the CssClass property of a control to a CSS style class defined in the Styles.css file that is a part of Web applications.