自.NET Framework出现以来,对网站外观进行控制一直是ASP.NET开发者的期待.ASP.NET 2.0使之成为现实,应用它的主题与皮肤,我们可以对外观进行控制。
作者:中国IT实验室 来源:中国IT实验室 2007年10月2日
关键字:
列表A
<asp:Label runat="server" BackColor="Red" ForeColor="White" skinid="redlabel" />
<asp:Label runat="server" BackColor="Blue" ForeColor="White" skinid="bluelabel" />
<asp:TextBox runat="server" BackColor="Black" ForeColor="Yellow" skinid="blacktb" />
<asp:TextBox runat="server" BackColor="White" ForeColor="Black" skinid="whitetb" /> |
列表B
<asp:Label runat="server" style="color: yellow; background: black;" skinid="csslabel" /> |
列表C
<%@ Page Language="C#" Theme="TechRepublicTest" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>TechRepublic.com sample</title>
</head>
<body>
<form id="form1" runat="server">
<asp:Label SkinID="redlabel" ID="lblTest" runat="server">Testing Red</asp:Label>
<asp:Label SkinID="bluelabel" ID="Label1" runat="server">Testing Blue</asp:Label>
<asp:TextBox SkinID="blacktb" ID="txtText" runat="server" Text="Type here" />
</form></body></html> |
查看本文来源