How to use skin files on asp.net

Steps to create skin files and use on asp.net

  1. Go to solution explorer  and right click on the website node.
  2. Choose "Add ASP.NET folder" and click  "Theme".
  3. You will see new folder under the App_Themes folder. You will place all the files for that theme on this folder.
  4. Create skin files and dump all css files, images on this folder.
  5. You can create as many themes as you like and easily switch change the theme of your site as per your need. How to apply theme You can configure on the web.config file to apply that theme on the entire site.
  6. Open up the web.config file and  add the following entires.
<pages validaterequest="false" stylesheettheme="MyTheme"></pages>

You can also apply the specific themes for pages of specific folder. To do so you have to create web.config on the folder level and override the theme configuration from the web.config of the root. Also you can specifiy theme on page level as well.


Like us

See also

Asp.net: Cache entire gridview

This tutorial explains how to entirely cache the gridview using asp.net cache object by overriding the gridview.

Caching on asp.net applications

Caching should be implemented to improve web site performance. This article en-lights on how to use asp.net built in cache api for faster site loading to lots of users simultaneously.