Another piece of ASP code I use quite often at work...
<%
on error resume next
dim i
for each i in session.contents
response.write( i & " = " & session(i) & "
")
next
%>
Northern Michigan Catholic Dad Blog
Another piece of ASP code I use quite often at work...
<%
on error resume next
dim i
for each i in session.contents
response.write( i & " = " & session(i) & "
")
next
%>
I found this great plugin Code Markup that allows for easy posting of code examples. So here's an example of ASP code to show a different greeting depending on the time of day.
<%
Dim dHour
dHour = Hour(Now)
If dHour < 12 Then
Response.Write "Good morning"
ElseIf dHour < 17 Then
Response.Write "Good afternoon"
Else
Response.Write "Good evening"
End If
%>
M | T | W | T | F | S | S |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |