Search code examples
.netasp.netcssskin

CSS files vs skin files


Q: I want to know :

  1. Can the .skin files replace the CSS files?
  2. What are the advantages of .skin files?

  3. Can .skin files offer more than CSS files?

    and

  4. When to use skin files in my web application?


Solution

  • Asp.net skins are one part of asp.net Themes. From the MSDN docs:

    Themes are made up of a set of elements: skins, cascading style sheets (CSS), images, and other resources. At a minimum, a theme will contain skins. Themes are defined in special directories in your Web site or on your Web server.

    Skins are used to define default markup for asp.net server controls:

    <asp:button runat="server" BackColor="lightblue" ForeColor="black" />
    

    whereas CSS is used to style your native HTML elements (of course asp.net server controls render as native elements so CSS can also be used to style these