Cache ASP.Net Tutorial

File: MasterDetails.aspx
<%@ Page Language="C#" %>
<%@ OutputCache Duration="3600" VaryByControl="dropCategories" %>
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


    Master/Details


    
    

    <%= DateTime.Now.ToString("T") %>
    
            id="dropCategories"
        DataSourceID="srcCategories"
        DataTextField="Name"
        DataValueField="Id"
        Runat="server" />
            id="btnSelect"
        Text="Select"
        Runat="server" />
    
            id="grdProducts"
        DataSourceID="srcProducts"
        GridLines="none"
        Runat="server" />
            id="srcCategories"
        ConnectionString="<%$ ConnectionStrings:Products %>"
        SelectCommand="SELECT Id,Name FROM ProductCategories"
        Runat="server" />
            id="srcProducts"
        ConnectionString="<%$ ConnectionStrings:Products %>"
        SelectCommand="SELECT Title,Director FROM Products
            WHERE CategoryId=@CategoryId"
        Runat="server">
        
                    Name="CategoryId"
            ControlID="dropCategories" />