<%@ Page Language="C#" Theme="Simple3" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Show Skin Theme</title>
</head>
<body>
    <form >
    <div>

    <asp:Label
       
        Text="What color background do I have?"
        BackColor="red"
        Runat="server" />
   
    </div>
    </form>
</body>
</html>

包含一个Label 控件,它的BackColor属性设为Red.但是,当打开页面时,皮肤文件中的BackColor属性值重写了页面中的属性值,Label控件的背景颜色就会成了橙色。
      主题文件这种默认行为在修改已有网站的时候非常有用。可以使用它来重写页面上的控件的所以皮肤属性。
      但是,有时候连Skin属性也需要重写。比如,整个站点中的所有Label都橙色,只有一个红色怎么办?
将theme改为 StyleSheetTheme属性,就行了.
      禁用主题,用EnableTheming="false" .

相关文章:

  • 2021-06-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-30
  • 2021-09-25
猜你喜欢
  • 2021-11-12
  • 2022-12-23
  • 2022-12-23
  • 2022-02-04
相关资源
相似解决方案