Mega Code Archive

 
Categories / ASP.Net / Session Cookie
 

Application StaticObjects (VB net)

<%@ Page Language="vb" %> <html>    <head>       <script runat="server">          Sub Page_Load()      Message.Text = "There are " & Application.StaticObjects.Count & _         " objects declared with the " & _         "&lt;object runat=&quot;server&quot;&gt; 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>