In this tutorial, we will show you how to use CSS and Theme to define the style of the page in ASP.NET 2.0 and VB.NET

We will use the namespace of System.Web.UI in this tutorial.

Please add two controls of labels, textboxs and buttons to the webpage page, and a control of dropdownlist to select color of controls in the page. Then please create theme folder of BlueTheme and PurpleTheme, and add Control.skin, Default.css to the folders.

The front end Default.aspx page looks something like this:

The flow for the code behind page as follows.

Download Source Files