Skip to Content
ASP.NET 3.5 For Dummies®
book

ASP.NET 3.5 For Dummies®

by Ken Cox
February 2008
Intermediate to advanced
428 pages
8h 52m
English
For Dummies
Content preview from ASP.NET 3.5 For Dummies®

10.5. Skinning Is Just What It Themes

Themes and skins are another way of adding style and consistency to ASP.NET pages without having to deal with each control separately. You might use them as an alternative to converting a site to master pages. (See the previous section, "Using Master Pages with Slavish Devotion.")

A theme is a unified look that you can apply to every page in your site. A skin is much the same, except that it applies to controls, such as the Button control and DropDownList control. This section introduces you to themes and skins with simple examples of a GoGreen theme that you can build on.

10.5.1. Creating a theme for GoGreen

ASP.NET looks for theme files in a special folder called App_Themes. Follow these steps to create the special folder, start a new theme, and design skins for two ASP.NET controls:

  1. In Solution Explorer, right-click the project name, and from the context menu, choose Add ASP.NET FolderTheme.

    Visual Web Developer automatically creates the App_Themes folder and a subfolder called Theme1.

  2. Rename Theme1 to GoGreen, as shown in Figure 10-8.

    Figure 10-8. Themes must reside in the special App_Themes folder.
  3. Right-click the GoGreen folder and add a skin file named Green.skin to the project (Add New ItemSkin FileAdd).

    The Green.skin file opens with the ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

ASP.NET 3.5 Unleashed

ASP.NET 3.5 Unleashed

Stephen Walther
ASP.NET 4 Unleashed

ASP.NET 4 Unleashed

Stephen Walther, Kevin Hoffman, Nate Dudek

Publisher Resources

ISBN: 9780470195925Purchase book