例子:
<%@ 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>
