web 2.0

ASP.NET(vb.net) Session & Array

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

ASP.NET(vb.net) Session & Array
.
.
.
Download this script.
Download

1 Star2 Stars3 Stars4 Stars5 Stars6 Stars7 Stars8 Stars9 Stars10 Stars (No Ratings Yet)
Loading ... Loading ...

Leave a Reply

You must be logged in to post a comment.