Simple configuration tutorial for ASP. NET topics
- 2020-10-23 20:56:57
- OfStack
The theme is similar to css but it can provide some features that css can't
-- Themes are based on controls, not HTML (themes allow finalization and reuse of almost all properties)
-- The theme is applied to the server
-- Themes can be applied through configuration files
-- Topics do not overlap like css (if properties are defined in both a topic and a space, the theme definition overrides the properties of the control, but this can also be modified)
Controls within a theme cannot define ID
Simple example
1. Site -- Add new item -- Appearance file (suffix.skin) -- Selecting "Yes" will create an App_Themes\skinName(folder for your theme name)
Then in the file you want to set the style of the control such as:
2. Display panel. SkinId is not yet available. Only 1 control panel is allowed for each control type within the same master.
< asp:Image runat="server" ImageUrl="~/images/image1.jpg" / >
--% >
< asp:TextBox runat="server" SkinId="test" width="20" / >
[/code]
Then use the theme on the page like Theme=" Name of your theme"
SkinID= "SkinID you set"
If neither file is SkinID, the theme will apply to all the corresponding controls on the interface
-- Themes are based on controls, not HTML (themes allow finalization and reuse of almost all properties)
-- The theme is applied to the server
-- Themes can be applied through configuration files
-- Topics do not overlap like css (if properties are defined in both a topic and a space, the theme definition overrides the properties of the control, but this can also be modified)
Controls within a theme cannot define ID
Simple example
1. Site -- Add new item -- Appearance file (suffix.skin) -- Selecting "Yes" will create an App_Themes\skinName(folder for your theme name)
Then in the file you want to set the style of the control such as:
<%--
Panels and copies are available. The following panels are provided for exemplary purposes.
1. Named control panel. SkinId � �" 1 The identity, because it is in the same master, 1 The controller cannot have a replay SkinId .
[code]
<asp:GridView runat="server" SkinId="gridviewSkin" BackColor="White" >
<AlternatingRowStyle BackColor="Blue" />
</asp:GridView>
2. Display panel. SkinId is not yet available. Only 1 control panel is allowed for each control type within the same master.
< asp:Image runat="server" ImageUrl="~/images/image1.jpg" / >
--% >
< asp:TextBox runat="server" SkinId="test" width="20" / >
[/code]
Then use the theme on the page like Theme=" Name of your theme"
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="WebForm1.aspx.cs"
Inherits="Test22.WebForm1" Theme="TestBox" %>
SkinID= "SkinID you set"
<asp:TextBox ID="TextBox1" SkinID="test" runat="server"></asp:TextBox>
If neither file is SkinID, the theme will apply to all the corresponding controls on the interface