ASP.NET(vb.net) Session & Array - Session & Array : The learn and script how to use Session and Array.
ShotDev Focus:
- ASP.NET(vb.net) Session and Array.
Example
AspNetSessionArray.aspx
<%@ Page Language="VB" %> <script runat="server"> Sub Page_Load(sender As Object, e As EventArgs) Dim myArray(4) myArray(0) = "abc" myArray(1) = "def" myArray(2) = "ghi" myArray(3) = "jkl" myArray(4) = "mno" Session("mySession") = myArray Dim i As Integer For i = 0 To UBound(Session("mySession")) IF Not IsNothing(myArray(i)) Then Me.lblText1.Text = Me.lblText1.Text & Session("mySession")(i) & "<br>" End IF 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