begin/test1.aspx

 

<html>

<head><title>First ASP.NET</title></head>

<body>

<center>

<h2>Hello CIS47 students!</h2>

<p><%Response.Write(now())%></p>

</center>

</body>

</html>

 

begin/test1a.aspx

 

<html>

<head><title>HTML & CSS</title></head>

<body>

<%

response.write("<h1>Formatted text!</h1>")

%>

<%

response.write("<h2>Note that you can use HTML tags in asp.net</h2>")

%>

<%

response.write("<p style='color:red'>You can also use CSS style attributes!</p>")

%>

</body>

</html>

 

begin/test1b.aspx

 

<html>

<head><title>Variables</title></head>

<body>

<%

dim rslt

rslt = 5 * 6

response.write("5 times 6 = " & rslt)

%>

</body>

</html>

 

begin/test1c.aspx

 

<html>

<head><title>Variables</title></head>

<body>

<%

dim first

dim last

first = "John"

last = "Doe"

response.write("The name is " & first & " " & last)

%>

</body>

</html>

 

begin/time1.aspx

 

<html>

<head>

<title>Playing with time tests!</title>

</head>

<body bgcolor=beige>

The CIS Department at BCC runs both day and evening classes.

<ul>

<li>Day classes run from 8:00AM until 4:00PM</li>

<li>Night classes run from 4:00PM until 10:00PM</li>

</ul>

<BR>

<%

dim tdate

dim thr

tdate=now()

thr = hour(now())

response.write("After checking our clock for the date " & tdate)

if thr >=22

response.write(" the campus is closed")

else

if thr >=16 then

response.write(" night school schedule is in effect!")

else

response.write(" day school schedule is in effect!")

end if

end if

%>

</body>

</html>

 

begin/mathfacts1.aspx

 

<html>

<head>

<title>Math facts</title>

</head>

<body bgcolor=beige>

<h1>Math Facts</h1>

<%

dim i as integer

dim j as integer

dim ans as integer

for i = 1 to 3

for j = 1 to 3

ans = i + j

response.write(i & " + " & j & " = " & ans & "<br />")

next

next

%>

</body>

</html>

 

begin/mathuntil1.aspx

 

<html>

<head><title>Math While Loop</title></head>

<body>

<body bgcolor=green text=beige>

<h1>Math Facts</h1>

<%

dim i as integer

dim j as integer

dim ans as integer

i = 1

Do Until i > 3

j = 1

Do Until j > 3

ans = i + j

response.write(i & " + " & j & " = " & ans & "<br />")

j = j + 1

loop

i = i + 1

loop

%>

</body>

</html>

 

begin/mathuntil2.aspx

 

<html>

<head><title>Math While Loop</title></head>

<body>

<body bgcolor=green text=beige>

<h1>Math Facts</h1>

<%

dim i as integer

dim j as integer

dim ans as integer

i = 1

Do

j = 1

Do

ans = i + j

response.write(i & " + " & j & " = " & ans & "<br />")

j = j + 1

loop Until j > 3

i = i + 1

loop Until i > 3

%>

</body>

</html>

 

 

begin/mathuntil3.aspx

 

<html>

<head><title>Math While Loop</title></head>

<body>

<body bgcolor=green text=beige>

<h1>Math Facts</h1>

<%

dim i as integer

dim j as integer

dim ans as integer

i = 4

Do

j = 4

Do

ans = i + j

response.write(i & " + " & j & " = " & ans & "<br />")

j = j + 1

loop until j > 3

i = i + 1

loop until i > 3

%>

</body>

</html>

 

begin/mathwhile1.aspx

 

<html>

<head><title>Math While Loop</title></head>

<body>

<body bgcolor=black text=red>

<h1>Math Facts</h1>

<%

dim i as integer

dim j as integer

dim ans as integer

i = 1

Do While i < 4

j = 1

Do While j < 4

ans = i + j

response.write(i & " + " & j & " = " & ans & "<br />")

j = j + 1

loop

i = i + 1

loop

%>

</body>

</html>

 

begin/mathwhile2.aspx

 

<html>

<head><title>Math While Loop</title></head>

<body>

<body bgcolor=black text=red>

<h1>Math Facts</h1>

<%

dim i as integer

dim j as integer

dim ans as integer

i = 4

Do While i < 4

j = 4

Do While j < 4

ans = i + j

response.write(i & " + " & j & " = " & ans & "<br />")

j = j + 1

loop

i = i + 1

loop

%>

</body>

</html>

 

begin/mathwhile3.aspx

 

<html>

<head><title>Math While Loop</title></head>

<body>

<body bgcolor=black text=red>

<h1>Math Facts</h1>

<%

dim i as integer

dim j as integer

dim ans as integer

i = 4

Do

j = 4

Do

ans = i + j

response.write(i & " + " & j & " = " & ans & "<br />")

j = j + 1

loop While j < 4

i = i + 1

loop While i < 4

%>

</body>

</html>

 

begin/deptarray.aspx

 

<html>

<head><title>Array</title></head>

<body>

<body bgcolor=maroon text=beige>

<h1>Departments</h1>

<%

Dim deptarray(4),indx

deptarray(0) = "Womens"

deptarray(1) = "Mens"

deptarray(2) = "Girls"

deptarray(3) = "Boys"

deptarray(4) = "Infants"

For indx = 0 to 4

response.write("The department for " & indx & " is " & deptarray(indx) & "<br />")

Next

%>

</body>

</html>