TextBoxSkin.skin:
<%--默认外观--%>
<asp:TextBox runat="server" BorderColor="#6699FF" BackColor="#CCFFCC" BorderWidth="1px" BorderStyle="Solid"></asp:TextBox>
<%--命名外观--%>
<%--<asp:TextBox SkinID="textboxSkin" runat="server" BackColor="#FFCC99" BorderColor="#FF6600" BorderStyle="Dotted" BorderWidth="2px"></asp:TextBox>--%>
Default.aspx:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" StyleSheetTheme="TextBoxSkin"%>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>创建一个简单的外观</title>
<style type="text/css">
.style
{
border-color:red;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div>
<table>
<tr>
<td>
默认外观1:
</td>
<td >
<asp:TextBox ID="TextBox1" runat="server" ></asp:TextBox>
</td>
</tr>
<tr>
<td>
默认外观2:
</td>
<td >
<asp:TextBox ID="TextBox2" runat="server" CssClass="style"></asp:TextBox>
</td>
</tr>
<tr>
<td>
命名外观:
</td>
<td >
<asp:TextBox ID="TextBox3" runat="server" ></asp:TextBox>
</td>
</tr>
</table>
</div>
</form>
</body>
</html>
结果:
如果按照 行内样式>Theme设置的外部样式>内部样式>StylesheetTheme设置的外部样式的话,默认外观2不是应该被修改成红色边框吗?