Using the OutputCache Directive (VB.net)
<%@ Page Language=VB Debug=true %>
<%@ OutputCache Duration=30 VaryByParam=none%>
<script runat=server>
Sub Page_Load(ByVal Sender as Object, ByVal E as EventArgs)
lbl1.Text = "The current time on the server is " & TimeOfDay()
End Sub
</script>
<HTML>
<HEAD>
<TITLE>Using the OutputCache Directive</TITLE>
</HEAD>
<Body LEFTMARGIN="40">
<form runat="server">
<asp:label id="lbl1" runat="server"/>
</Form>
</BODY>
</HTML>
Related examples in the same category