ASP.NET(vb.net) Session.Keys() - Session Object - Session.Keys() : Session keys are keys that are generated to be used in a single communication session. Session keys are frequently changed and are discarded when they are no longer needed. For example, TLS uses a separate session key for each connection and S/MIME uses a separate session key for each email message. Typically a symmetric key is used as the session key.
ShotDev Focus:
- ASP.NET(vb.net) Session.Keys() - Session Object
Example
AspNetSessionKeys.aspx
<%@ Page Language="VB" %>
<script runat="server">
Sub Page_Load(sender As Object, e As EventArgs)
'*** Create Session ***'
Session.TimeOut = 20
Session("Name") = "Mr.Weerachai Nukitram"
Session("NickName") = "Mr.Win"
Session.Add("SiteName","www.ShotDev.Com")
'*** Read Session ***'
Dim items As Object
For Each items In Session.Keys
Me.lblText1.Text = Me.lblText1.Text & items & " = " &Session(items) & "<br>"
Next
End Sub
</script>
<html>
<head>
<title>ShotDev.Com Tutorial</title>
</head>
<body>
<form runat="server">
<asp:Label id="lblText1" runat="server"></asp:Label><br /><br />
</form>
</body>
</html>
Screenshot
 
			


 Loading ...
 Loading ...