Table of Contents [Hide/Show]
Lesson 1: Using Master Pages Master Page Content Page Programmatically Changing a Master Page Lesson 2: Using Themes Contents Creation Application Creating a Skin Types of Skins Restrictions Sample Skin Content Precedence Rules for Applying Themes Disabling a Theme Applying a Theme Programmatically Lesson 3: Caching Application Caching Overview Inserting Items Page Output Caching Declarative Configuration Partial-Page Caching Programmatic Caching Using Substitution to Update Caches Programmatically Invalidating Cached Pages Determining Whether to Return a Cached Page Prior to Rendering Creating a Cache Page Output Dependency Configuring Caching for an Entire Application
<%@ Master ... %>
<%@ Page MasterPageFile="~/MyMasterPage.master" ... %> <!-- Option declaration needed if referencing public members of master page from content page --> <%@ MasterType VirtualPath="~/MyMasterPage.master" %>
void Page_PreInit(object sender, EventArgs e) { MasterPageFile = "~/MyMasterPage.master"; }
*.skin
*.css
~/App_Themes
@Page
<page Theme="ThemeName" >
<page StyleSheetTheme="ThemeName" >
<system.web>
SkinID
runat="server"
ID
<!--===== Default Skin =====--> <asp:Button runat="server" BackColor="Red" ForeColor="White" Font-Name="Arial" Font-Size="9px" /> <!--===== Named Skin =====--> <asp:Label runat="server" SkinId="Title" Font-Size="18px" /> <!--===== Using Images in a Theme =====--> <!-- Company A’s Skin File --> <asp:Image runat="server" SkinID="CompanyLogo" ImageUrl="~/App_Themes/Contoso/contoso.jpg" /> <!-- Company B’s Skin File --> <asp:Image runat="server" SkinID="CompanyLogo" ImageUrl="~/App_Themes/Fabrikam/fabrikam.jpg" />
<asp:Image runat="server" SkinID="CompanyLogo" />
StyleSheetTheme
Theme
<%@ Page EnableTheming="false" %>
EnableTheming="false"
Page_PreInit
Page.Theme
Page.StyleSheetTheme
uxControl.SkinID
Cache
Session
Cache["key"] = object;
Cache.Insert()
CacheDependency
AggregateCacheDependency
<%@ OutputCache %>
GetVaryByCustomString
Global.asax
VaryByParam
VaryByControl
<@ OutputCache >
Response.Cache
ScrewTurn Wiki version 3.0.1.400. Some of the icons created by FamFamFam. Except where noted, all contents Copyright © 1999-2024, Patrick Jasinski.