Custom Search

Monday, April 7, 2008

Themes in asp.net

An ASP.NET Theme enables you to apply a consistent style to the pages in your website. You can use a Theme to control the appearance of both the HTML elements and ASP.NET controls that appear in a page.

Themes are different than Master Pages. A Master Page enables you to share content across multiple pages in a website. A Theme, on the other hand, enables you to control the appearance of the content.

Create a theme as follows:

  1. Create an App_Themes folder in the root of your application.

  2. Create a folder with the name you want to use for the theme in the App_Themes folder.

  3. Create a .skin file in the folder created above containing a definition for each server control you use in your application with the attributes that define its appearance set the way you want the control to look.

  4. (Optionally) Create a .css file in the folder created above to use with your .skin file.

  5. (Optionally) Add any images to the folder created above or to a subfolder as desired.

In the .aspx file for pages in your application set the Theme attribute of the @ Page directive to the name of the theme you want to use for the page.

No comments:

Free Traffic

 Join My Community at MyBloglog! Blog Flux Directory 

Web Developement Blogs - BlogCatalog Blog Directory web development blog  Internet Blogs - Blog Top Sites 

Blog Directory 

Click Here for Free Traffic!

Link2Communion.com