当前位置:开发者网络 >> 技术教程 >> ASP教程 >> 脚本编码 >> 内容
精彩推荐
分类最新教程
分类热点教程
  
ASP+页缓存OutputCache Duration用法(指定页面过时时间)
作者:未知
日期:2003-04-15
人气:
投稿:Andy.m(转贴)
来源:未知
字体:
收藏:加入浏览器收藏
以下正文:
例子:
<%@ 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>
相关文章: