Private Sub btnSessions_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnSessions.Click
Dim keys As NameObjectCollectionBase.KeysCollection = Session.Keys
Dim key As String
Dim sSessions As String
For Each key In keys
' key is the item's key
' Session[key] returns the item's value
sSessions &= key.ToString & " - " & Session(key).ToString &
vbCrLf
Next key '
If sSessions.Length = 0 Then
txtSessions.Text = "No Active Sessions"
Else
txtSessions.Text = sSessions
End If
End Sub