Jump to Content
Jump to Navigation

Archive for the “ASP”

Output Sessions

Monday, May 16th, 2011

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) & "<br />")
next
%>


Just testing a plugin…

Tuesday, August 5th, 2008

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
%>