<%@ Page Language="vb" %>
<html>
<head>
<script runat="server">
Sub Page_Load()
Message.Text = "There are " & Application.StaticObjects.Count & _
" objects declared with the " & _
"<object runat="server"> syntax in Application scope."
Dim myobj As Object
For Each myObj in Application.StaticObjects
If myObj.Value.GetType.ToString() = _
"System.Web.UI.WebControls.TextBox" Then
Page.Controls.Add(myObj.Value)
End If
Next
End Sub
</script>
</head>
<body>
<asp:label id="Message" runat="server"/>
</body>
</html>