Page

ASP.NET - How to use theme and skin id (SkinID) in Panel control

//PanelSkinID.aspx

<%@ Page Language="C#" Theme="PanelSkinIDTest" %>  
  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
  
<script runat="server">  
      
</script>  
  
<html xmlns="http://www.w3.org/1999/xhtml">  
<head id="Head1" runat="server">  
    <title>How to use theme and skin id (SkinID) in Panel control</title>  
</head>  
<body>  
    <form id="form1" runat="server">  
    <div>  
        <h2 style="color:Navy; font-style:italic;">Panel Example: Theme and SkinID</h2>  
        <asp:Panel   
             ID="Panel1"  
             runat="server"  
             SkinID="RosyBrown"  
             >  
             <br />  
             Panel SkinID: RosyBrown  
        </asp:Panel>  
        <br />  
        <asp:Panel   
             ID="Panel2"  
             runat="server"  
             SkinID="PeachPuff"  
             >  
             <br />  
             Panel SkinID: PeachPuff  
        </asp:Panel>  
    </div>  
    </form>  
</body>  
</html>  


//PanelSkinIDTest.skin

<asp:Panel   
     SkinID="RosyBrown"  
     runat="server"  
     Height="150"  
     Width="350"  
     BorderColor="SaddleBrown"  
     BackColor="RosyBrown"  
     ForeColor="FloralWhite"  
     Font-Names="Comic Sans MS"  
     Font-Size="Large"  
     HorizontalAlign="Center"  
     BorderWidth="3"  
     >  
</asp:Panel>  
  
<asp:Panel   
     SkinID="PeachPuff"  
     runat="server"  
     Height="150"  
     Width="350"  
     BorderColor="Crimson"  
     BackColor="PeachPuff"  
     ForeColor="RosyBrown"  
     Font-Bold="true"  
     Font-Italic="true"  
     Font-Size="X-Large"  
     HorizontalAlign="Center"  
     BorderWidth="3"  
     >  
</asp:Panel>  

No comments:

Post a Comment