
- Forum
- Programming Talk
- ASP
- Basic ASP Example - A simple Clock
Basic ASP Example - A simple Clock
This is a discussion on Basic ASP Example - A simple Clock within the ASP forums, part of the Programming Talk category; <% ' This simple asp page will display the current date/time ' First we declare (Dim) a string variable strGreeting, ...
-
Basic ASP Example - A simple Clock
<%
' This simple asp page will display the current date/time
' First we declare (Dim) a string variable strGreeting, which will hold the value / text "Hello, today is"
' and also a VB function now()
' Classic ASP page allows ASP code to be mixed with HTML code.
' strGreeting is displayed in HTML
' To run this asp page, you need to have IIS installed on your machine, and you can copy this file to
' your local drive (eg, C:\Inetpub\wwwroot\). Open your default browser, and type in http://localhost/aspExample.asp
Dim strGreeting
strGreeting = "Hello, today is " & now()
%>
<html>
<head>
<title>ASP Example</title>
</head>
<body>
<%=strGreeting%>
</body>
</html>
My name is Rick and I'm a Exforsysoholic! (Is that even a word lol)
-
very simple and nice sample code
-
does <%=strGreeting%> work or you need <% ?strGreeting%>
where ? is for print
-
Sponsored Ads

Reply With Quote





