Preferred Language:

Listing 6.8 - ShowEnableTheming.aspx

Illustrates how you can disable a theme.

Listing 6.8 - ShowEnableTheming.aspx (C#)
Copy

<%@ Page Language="C#" Theme="Simple4" %>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Show EnableTheming</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
    <asp:Calendar
        id="Calendar1"
        Runat="server" />
        
    <br /><br />
    
    <asp:Calendar
        id="Calendar2"
        EnableTheming="false"
        Runat="server" />    
    
    </div>
    </form>
</body>
</html>

The page above uses the following skin.

Listing 6.9 - Simple4\Calendar.skin
Copy

<asp:Calendar
    BackColor="White" 
    BorderColor="White" 
    BorderWidth="1px" 
    Font-Names="Verdana" 
    Font-Size="9pt" 
    ForeColor="Black" 
    NextPrevFormat="FullMonth" 
    Width="400px"
    Runat="Server">
    <SelectedDayStyle 
        BackColor="#333399" 
        ForeColor="White" />
    <OtherMonthDayStyle 
        ForeColor="#999999" />
    <TodayDayStyle 
        BackColor="#CCCCCC" />
    <NextPrevStyle 
        Font-Bold="True" 
        Font-Size="8pt" 
        ForeColor="#333333" 
        VerticalAlign="Bottom" />
    <DayHeaderStyle 
        Font-Bold="True" 
        Font-Size="8pt" />
    <TitleStyle 
        BackColor="White" 
        BorderColor="Black" 
        BorderWidth="4px" 
        Font-Bold="True"
        Font-Size="12pt" 
        ForeColor="#333399" />
</asp:Calendar>