Programmatically caching a User Control
<%@ Page Language="C#" %>
Show Dynamic User Control
File: Control.ascx
<%@ Control Language="C#" ClassName="Products" %>
<%@ OutputCache Duration="600" VaryByParam="none" %>
User Control Time:
<%= DateTime.Now.ToString("T") %>
"
SelectCommand="SELECT Title,Director FROM Products"
Runat="server" />