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:
Create an App_Themes folder in the root of your application.
Create a folder with the name you want to use for the theme in the App_Themes folder.
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.
(Optionally) Create a .css file in the folder created above to use with your .skin file.
(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:
Post a Comment