01.
<%@ Page Language=
"C#"
Debug=
"true"
%>
02.
<script runat=
"server"
>
03.
04.
void
Page_Load(Object sender, EventArgs e)
05.
{
06.
Application[
"Database"
] =
"mydatabase.mdb"
;
07.
Application[
"UserID"
] =
"myuser"
;
08.
Application[
"Password"
] =
"mypassword"
;
09.
10.
this
.lblText.Text = Application.Count.ToString() +
" Items"
;
11.
}
12.
13.
</script>
14.
<html>
15.
<head>
16.
<title>ThaiCreate.Com ASP.NET - Application Object</title>
17.
</head>
18.
<body>
19.
<form id=
"form1"
runat=
"server"
>
20.
<asp:Label id=
"lblText"
runat=
"server"
></asp:Label>
21.
</form>
22.
</body>
23.
</html>