OutputCache Duration="30" VaryByParam=true (C#) : OutputCache « Development « ASP.NET Tutorial






<%@ Page Language="C#" %>
<%@ OutputCache Duration="30" VaryByParam="true"%>

<script runat="server">
   void Page_Load(Object Sender, EventArgs e) {
      lblMessage.Text = "Welcome " + Request.Params["id"] + "! The time is now " + DateTime.Now.ToString("T");
   }
</script>

<html><body>
   <asp:Label id="lblMessage" runat="server"/>
</body></html>








9.36.OutputCache
9.36.1.Using the Output Cache (C#)
9.36.2.OutputCache Duration="30" VaryByParam=true (C#)
9.36.3.Set VaryByParam (VB.net)