Session.StaticObjects : Session class « Sessions « ASP.NET Tutorial






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








11.2.Session class
11.2.1.Session.Mode
11.2.2.Session.Abandon()
11.2.3.Use Session and Server.Transfer to create a wizard
11.2.4.Session.CodePage
11.2.5.Session.Contents.RemoveAll()
11.2.6.Session.CopyTo
11.2.7.Session.IsCookieless
11.2.8.Session.IsNewSession
11.2.9.Session.IsReadOnly
11.2.10.Session.Item
11.2.11.Session.Keys
11.2.12.Session.LCID
11.2.13.Session.Remove
11.2.14.Session.RemoveAll
11.2.15.Session.RemoveAt
11.2.16.Session.StaticObjects
11.2.17.Session.Timeout