Exforsys
+ Reply to Thread
Results 1 to 3 of 3

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, ...

  1. #1
    Ricky is offline Junior Member Array
    Join Date
    Apr 2006
    Answers
    19

    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)

  2. #2
    Lucy is offline Junior Member Array
    Join Date
    Apr 2006
    Answers
    7
    very simple and nice sample code


  3. #3
    zsk_00 is offline Member Array
    Join Date
    May 2006
    Answers
    37
    does <%=strGreeting%> work or you need <% ?strGreeting%>

    where ? is for print


    •    Sponsored Ads



Latest Article

Network Security Risk Assessment and Measurement

Read More...