惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
SegmentFault 最新的问题
Spread Privacy
Spread Privacy
Google DeepMind News
Google DeepMind News
WordPress大学
WordPress大学
Blog — PlanetScale
Blog — PlanetScale
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Apple Machine Learning Research
Apple Machine Learning Research
SecWiki News
SecWiki News
腾讯CDC
P
Privacy International News Feed
Webroot Blog
Webroot Blog
J
Java Code Geeks
爱范儿
爱范儿
A
About on SuperTechFans
S
Secure Thoughts
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
D
DataBreaches.Net
Cloudbric
Cloudbric
Security Archives - TechRepublic
Security Archives - TechRepublic
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
C
Cyber Attacks, Cyber Crime and Cyber Security
P
Proofpoint News Feed
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Security Latest
Security Latest
Forbes - Security
Forbes - Security
小众软件
小众软件
www.infosecurity-magazine.com
www.infosecurity-magazine.com
C
Cybersecurity and Infrastructure Security Agency CISA
T
Threatpost
量子位
MongoDB | Blog
MongoDB | Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
月光博客
月光博客
W
WeLiveSecurity
P
Privacy & Cybersecurity Law Blog
Vercel News
Vercel News
Google Online Security Blog
Google Online Security Blog
云风的 BLOG
云风的 BLOG
GbyAI
GbyAI
S
Security @ Cisco Blogs
T
The Exploit Database - CXSecurity.com
Help Net Security
Help Net Security
V
Visual Studio Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
Application and Cybersecurity Blog
Application and Cybersecurity Blog
博客园 - 聂微东
P
Proofpoint News Feed
C
CERT Recently Published Vulnerability Notes
Attack and Defense Labs
Attack and Defense Labs

博客园 - enjoy .net

visual basic video series:Forms over data 无功倒送问题 变压器高低压侧的电流计算 爬电、爬距(泄漏距离)、爬电比距 使用BackgroundWorker进行Thread编程 VS2005的初体验 地板选购指南 IT服务管理时代已经到来 IT服务管理的效果分析 How to use the Install from Media feature to promote Windows Server 2003-based domain controllers 70-294读书笔记 TechED上海 术语: Tombstone/Tombstone Lifetime Windows 2003故障恢复 几乎没有管理的国企! ASP.Net 2.0中的Membership,Role和Profile ntdsutil的功能 体验了一次DNS的动态更新功能 Flexible Single Master Operations (FSMO)
关于ASP.Net 2.0中的Theme
enjoy .net · 2005-08-14 · via 博客园 - enjoy .net

1、Theme和CSS的定义
Themes are not the same thing as cascading style sheets.
Cascading style sheets enable you to control the appearance of HTML tags on the browser.
Themes, on the other hand, are applied on the server and they apply to the properties of ASP.NET controls. For example, you can use a theme, but not a cascading style sheet, to specify whether or not a GridView control displays a header or footer.
也就是说Theme针对ASP.Net Server Controls而CSS针对HTML中的Tags

2、Theme(主题)是在后缀名为.skin的皮肤文件中定义的

3、Default Skin和Named Skin
如果ASPX中的Server Control没有指明Control ID,则将应用Default Skin,否则将使用名称一致的Named Skin。注意如果要应用Theme,首先必须ASPX文件的头部即在Page指令中定义Theme,如下所示:
<%@ Page Theme="OrangeTheme" %>

4、将Theme应用到整个应用
在Web.Config文件中加入黑体所示的代码
<configuration>
    <system.web>
  <pages theme="OrangeTheme" />
    </system.web>
</configuration>

5、Theme和StyleSheetTheme
当应用Theme时,Theme中的属性的优先级要高于Server Control中指定属性的优先级。
而通过应用StyleSheetTheme,则可以使Server Control中的属性覆盖StyleSheetTheme中的属性。

6、Theme和CSS
可以将CSS文件放入Theme所在的文件夹,当页面应用Theme时,将自动应用CSS。

7、Theme要比CSS灵活一点,这主要体现在可以通过代码对Theme进行设置和访问。这样就可以很方便地定制用户喜爱的显示方式。

<%@ Page Language="VB" %>
<script runat="server">
    Sub Page_PreInit(ByVal sender As Object, ByVal e As EventArgs)
        Page.Theme = Request("dropTheme")
    End Sub
</script>
<html>
<head id="Head1" runat="server">
    <title>Dynamic Theme</title>
</head>
<body>
    <form id="form1" runat="server">
    
    <asp:DropDownList
        id="dropTheme"
        AutoPostBack="true"
        Runat="Server">
        <asp:ListItem Text="YellowTheme" />
        <asp:ListItem Text="RedTheme" />
    </asp:DropDownList>

    </form>
</body>
</html>

参考网址Creating Web Application Themes in ASP.NET 2.0