| 
| 技术资料  > ASP技术 > 系统相关 : ASP+页缓存OutputCache Duration用法(指定页面过时时?/td> |  
ASP+页缓存OutputCache Duration用法(指定页面过时时?/H1> March 25,2004 |  
例子: 
<%@ OutputCache Duration="60" %> 
就是这个页在缓冲中保存60秒。 
 
下面是利用缓冲的程序页例子 
 
<%@ OutputCache Duration="10" %> 
 
<html> 
 
  <script language="C#" runat="server"> 
 
    void Page_Load(Object sender, EventArgs e) { 
          TimeMsg.Text = DateTime.Now.ToString(); 
    } 
 
  </script> 
   
  <body> 
   
    <h3><font face="Verdana">Using the Output Cache</font></h3> 
     
    <p><i>Last generated on:</i> <asp:label id="TimeMsg" runat="server"/> 
     
  </body> 
 
</html> 
         |  
 
 | 
  
Copyright © 2001-2008 Shenzhen Hiblue Software Team All rights reserved