Working with Themes in ASP.NET 2.0
page 4 of 10
by SANJIT SIL
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 43122/ 50

Creating Theme

In order to create Theme for an application, first we need to create a proper folder structure in application. Within the App_Themes folder, we can create an additional Theme Folder for each and every Theme that we might use in application. The reasons to use more than one Theme are because seasons change, day/night changes, different business units, category of user, user preferences, etc.

The elements of a Theme Folder can be as follows:

·         A Single skin file

·         CSS files

·         Images

Creating a Skin

A skin enables us to modify any of the properties applied to the server controls in our ASP.NET page. Skins can work in conjunction with CSS files or images. To create a Theme we can use a single skin file in the Theme Folder. The skin file extension should be always .skin.  

Listing 8

<asp:Label Runat=”server” ForeColor=”Red” Font-Names=”Verdana” Font-Size=”X-Small”/>
<asp:Textbox Runat=”server” ForeColor=”Red”
 Font-Names=”Verdana” Font-Size=”X-Small”  BorderStyle=”Solid” BorderWidth=”1px”
 BorderColor=”Yellow” 
Font-Bold=”True” />

As the above example suggest, we need to define a definition for style in respect of each server control in skin file in the application. We can create different skin files in different Theme Folder.

Listing 9

<% Page Language=“C#” Theme =”myTheme” %>

View Entire Article

User Comments

No comments posted yet.

Product Spotlight
Product Spotlight 





Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-03-29 8:12:27 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search