Pages

Sunday, August 7, 2011

Difference between skin file and style sheet (CSS)

Both skin files and style sheets come under ASP.NET themes (App_Themes) to give your site a consistent and customized look and feel. It is a convenient method for a developer to apply design across the web site with minimal effort.

Difference between skin file and CSS file
  • Skin file has .skin file extension and style sheet has .css file extension.
  • Skin file can be used on ASP.NET server controls, where as style sheets are used in standard HTML mark up elements.
  • Skin file is rendered from IIS server. CSS is rendered from the client's browser. (That's why when you apply CSS elements, you get browser specific issues.)
Example for Skin file

-asp:GridView runat="server" SkinId="gridviewSkin" BackColor="White" -
-AlternatingRowStyle BackColor="Blue" /-
-/asp:GridView-
 
Example for CSS file

body
{
          background-color :#F0F0F0;
}

1 comment:

  1. Thank you so much
    Its too helpful to me about differentiate both

    ReplyDelete