Removing cache items (VB.net)
<%@ Page Language="vb" %>
<html>
<head>
<title>Removing cache items in ASP.NET</title>
<script runat="server">
Sub Page_Load()
Cache("Key1") = "foo"
Response.RemoveOutputCacheItem(Request.Path)
If Not Cache("Key1") Is Nothing Then
Message.Text = Cache("Key1")
Else
Message.Text = "Cache items for " & Request.Path & _
" removed."
End If
End Sub
</script>
</head>
<body>
<asp:label id="Message" runat="server"/>
</body>
</html>
Related examples in the same category