<%@ Page Language="vb" %>
<html>
<head>
<script runat="server">
Sub Page_Load()
If Not Application("foo") Is Nothing Then
Application.Remove("foo")
Message.Text = "Item 'foo' was removed."
Else
Message.Text = "Item 'foo' does not exist."
End If
End Sub
</script>
</head>
<body>
<asp:label id="Message" runat="server"/>
</body>
</html>