ASP.NET(vb.net) Session.Item() - Session Object - Session.Item() : Session Item are Item that are generated to be used in a single communication session.
ShotDev Focus:
- ASP.NET(vb.net) Session.Item() - Session Object
Example
AspNetSessionItem.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 ***' Me.lblText1.Text = Session.Item("Name") Me.lblText2.Text = Session.Item("NickName") Me.lblText3.Text = Session.Item("SiteName") End Sub </script> <html> <head> <title>ShotDev.Com Tutorial</title> </head> <body> <form runat="server"> <asp:Label id="lblText1" runat="server"></asp:Label><br /> <asp:Label id="lblText2" runat="server"></asp:Label><br /> <asp:Label id="lblText3" runat="server"></asp:Label><br /> </form> </body> </html>
Screenshot