欢迎光临
我们一直在努力

ASP+页缓存OutputCache Duration用法(指定页面过时时间)

建站超值云服务器,限时71元/月

例子:

<%@ 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>

赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » ASP+页缓存OutputCache Duration用法(指定页面过时时间)
分享到: 更多 (0)