<%@ 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
myMessage.Text = Cache("Key1")
Else
myMessage.Text = "Cache items for " & Request.Path & _
" removed."
End If
End Sub
</script>
</head>
<body>
<asp:label id="myMessage" runat="server"/>
</body>
</html>