Creating a Theme
Let's start by creating a theme for the TropicalGreen site. We will name the theme Sunny and use it to apply a new design on our website. In ASP.NET 2.0, themes used by a single project are stored directly below the project's application folder in a special folder named App_Themes
. You can create as many themes (or sub folders) as your site requires.
1. First, let's create the
App_Themes
folder. In Solution Explorer, right-click the TropicalGreen project and select Add ASP.NET folder | Theme. A new folder namedApp_Themes
appears.2. Within the
App_Themes
folder is a subfolder namedTheme1
. Rename the folder toSunny
.
Applying a Theme to the Entire Site
We have created a theme named Sunny
. Now let's apply it to the TropicalGreen site.
In the web.config
file, look for the<pages>
tag and add an attribute named theme
and set its value to Sunny
.
<pages validateRequest="false"
theme="Sunny"/>
We have applied the Sunny
theme to the TropicalGreen site. However, the theme...