The theme is similar to CSS but he can provide some features that CSS cannot provide
---------------theme is based on control rather than HTML (subject allows and reuses almost all attributes)
---------------theme applied on the server
---------------can apply a theme through a configuration file
---------------topics don't overlap like css (if a theme and space define attributes at the same time, the definition of the theme overrides the properties of the control, which can also be modified)
The controls inside the topic cannot define IDs
Simple example
1, the site---Add a new Item---skin file (suffix named. skin)--select "Yes" to create a app_themes\skinname (your Subject name folder)
Then set the style in the file where you want to set the control like this:
Copy Code code as follows:
<%--
Preset panel. The following panels provide only examples of use.
1. Named Control Panel. SkinId should be the only definition, because in the same subject, a control type cannot have duplicate SkinId.
[Code]
<asp:gridview runat= "Server" skinid= "Gridviewskin" backcolor= "White" >
<alternatingrowstyle backcolor= "Blue"/>
</asp:GridView>
2. Preset panel. SkinId undefined. In the same topic, each control type can have only one preset control panel.
<asp:image runat= "Server" imageurl= "~/images/image1.jpg"/>
--%>
<asp:textbox runat= "Server" skinid= "test" width= "/>"
[/code]
Then on the page Use this topic like: Theme= "Your theme's name"
Copy Code code as follows:
<%@ Page language= "C #" autoeventwireup= "true" codefile= "WebForm1.aspx.cs"
inherits= "Test22.webform1" theme= "Testbox"%>
When you use a control, you can skinid= "the SkinID You set"
Copy Code code as follows:
<asp:textbox id= "TextBox1" skinid= "Test" runat= "Server" ></asp:TextBox>
If two files are not skinid This theme will be applied to all the corresponding controls on the interface