ASP 101 - Active Server Pages 101 welcome.aspx
<%@ Page Language="VB" %>
<script language="VB" runat="server">
	Sub Page_Load(sender as Object, e as EventArgs)
		Dim dtNow As DateTime
		Dim iHour As Integer
		dtNow = Now()
		lblTime.Text = dtNow.ToLongTimeString
		lblDate.Text = dtNow.ToLongDateString _
			& " (" & dtNow.ToShortDateString & ")" 
		iHour = dtNow.Hour
		If iHour < 12 Then
			lblGreeting.Text = "Good morning!"
		ElseIf iHour < 17 Then
			lblGreeting.Text = "Good afternoon!"
		Else
			lblGreeting.Text = "Good evening!"
		End If
	End Sub
</script>
<html>
<head>
<title>ASP.NET Greeting Sample</title>
</head>
<body>
<p>
<asp:Label id="lblGreeting" runat="server" />
We hope you are enjoying our sample code.
</p>
<p>
If you are curious it is currently
<asp:Label id="lblTime" text=Time() runat="server" />
on <asp:Label id="lblDate" runat="server" />.
</p>
<hr />
<p>
Click <a href="http://www.asp101.com/samples/welcome_aspx.asp">here</a>
to read about and download the source code.
</p>
</body>
</html>