01.
<%@ Page Language=
"VB"
%>
02.
<script runat=
"server"
>
03.
04.
Sub
Page_Load(sender
As
Object
, e
As
EventArgs)
05.
Application(
"Database"
) =
"mydatabase.mdb"
06.
Application(
"UserID"
) =
"myuser"
07.
Application(
"Password"
) =
"mypassword"
08.
09.
Application.Add(
"Account"
,
"Win"
)
10.
11.
ViewApplication()
12.
End
Sub
13.
14.
Sub
ViewApplication()
15.
Dim
items
As
Object
16.
For
Each
items
In
Application.Keys
17.
Me
.lblText.Text =
Me
.lblText.Text & items &
" = "
& Application(items) &
"<br>"
18.
Next
19.
End
Sub
20.
21.
</script>
22.
<html>
23.
<head>
24.
<title>ThaiCreate.Com ASP.NET - Application
Object
</title>
25.
</head>
26.
<body>
27.
<form id=
"form1"
runat=
"server"
>
28.
<asp:Label id=
"lblText"
runat=
"server"
></asp:Label>
29.
</form>
30.
</body>
31.
</html>