| ตัวอย่าง Example |
|
<SCRIPT LANGUAGE=VB RUNAT=SERVER>
Dim Name As new ArrayList
Dim Surname As New ArrayList
Sub Page_Load()
Dim intLoop As integer
Name.Add("Suny")
Name.Add("Tom")
Name.Add("John")
Name.Add("Bob")
Name.Add("Billy")
Name.Add("Mar")
Surname.Add("Estan")
Surname.Add("Marrin")
Surname.Add("Bread")
Surname.Add("Lafter")
Name.AddRange(Surname)
label1.Text = ""
For intLoop = 0 To Name.Count–1
label1.Text = label1.Text & Name(i) & "<br />"
Next
End Sub
</SCRIPT>
Display all data in Array<br />
<asp:label id=label1 runat=server />
|
|
|