01.
<%@ Page Language=
"VB"
%>
02.
<script runat=
"server"
>
03.
04.
Sub
Page_Load(sender
As
Object
, e
As
EventArgs)
05.
Dim
strString
As
String
=
"a,b,c,d,e,f"
06.
Dim
strSplit1
As
Array
07.
Dim
strSplit2
As
Array
08.
Dim
i
As
Integer
09.
10.
strSplit1 = Split(strString,
","
)
11.
strSplit2 = strString.Split(
","
)
12.
13.
For
i = 0
To
UBound(strSplit1)
14.
Me
.lblText1.Text =
Me
.lblText1.Text & strSplit1(i) &
"<br>"
15.
Next
16.
17.
For
i = 0
To
strSplit2.Length - 1
18.
Me
.lblText2.Text =
Me
.lblText2.Text & strSplit2(i) &
"<br>"
19.
Next
20.
End
Sub
21.
22.
</script>
23.
<html>
24.
<head>
25.
</head>
26.
<body>
27.
<form runat=
"server"
>
28.
<asp:Label id=
"lblText1"
runat=
"server"
></asp:Label>
29.
<hr />
30.
<asp:Label id=
"lblText2"
runat=
"server"
></asp:Label>
31.
</form>
32.
</body>
33.
</html>