A day with .Net

My day to day experince in .net

Using skin in asp.net

Posted by vivekcek on July 22, 2009

A skin is a definition of styles applied to the server controls in your ASP.NET page.
Skins can work in conjunction with CSS files or images.
The skin file can have any name, but it must have a .skin file extension.
The Summer.skin file.

<asp:Label Runat="server" 
           ForeColor="#004000" 
           Font-Names="Verdana"
           Font-Size="X-Small" />

<asp:Textbox Runat="server" 
             ForeColor="#004000" 
             Font-Names="Verdana"
             Font-Size="X-Small" 
             BorderStyle="Solid" 
             BorderWidth="1px"
             BorderColor="#004000" 
             Font-Bold="True" />

<asp:Button Runat="server" 
            ForeColor="#004000" 
            Font-Names="Verdana"
            Font-Size="X-Small" 
            BorderStyle="Solid" 
            BorderWidth="1px"
            BorderColor="#004000" 
            Font-Bold="True" 
            BackColor="#FFE0C0" />

Control definitions must contain the Runat=”server” attribute.
No ID attribute is specified in the skinned version of the control.
Using the Summer theme in an ASP.NET page.

skin

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s