Welcome
Arachne's Web
A group focused on serving the AW community by providing help and discussion on topics such as HTML, CSS, web design, homesite decorating, netiquette and issues important to web artists.

Arachnids are such Show Offs! (- threads, 348 posts)
    Programming Tutorials- ASP, PHP, Java, SQL etc. (6 posts)
    Social Thread

    ...
    0 Members have made 0 Posts here to date.
    Google
    AncientWorlds.net Web
    Next:
    Prev: 1.1 ASP - Hello World
    1.1 ASP - Hello World
    BelayAvatar.gif
    Author: * Belay Fabius - 0 Posts on this thread out of 41 Posts sitewide.
    Date: Oct 26, 2003 - 22:02


    Arachne Academy Logo 01 small
    ASP Hello World

    It is customary to start a programming language with "Hello World". In ASP case we start by displaying the time. The code is
    <%=now()% >

    Let us analyze what happens. Like html all asp tags start with angle bracket < followed by percent sign %. To mark the end of asp code you close it first with percent sign followed by another angle bracket. So anything within <% ... %> is an asp code. Microsoft IIS servers including the personal web server (PWS) recognize this by default. Unix system use software's like chill soft when needed.

    We are left with two items. The = sign is a shorthand to say to the server please write this on the web page. In this case it will write the result of the code Now() . Now is a function that displays time in its default format. This built in function is also used on excel, access and all office applications. If you type on excel spreadsheet cell =now() and press enter the time will be displayed.

    This code needs some format for that we will add FormatDateTime as follows.<%=FormatDateTime(Now(), 1)%> the result will be Monday, October 27, 2003 (unlike the display this value is static). FormatDateTime is intuitive, it formats the clock output. the value 1 is the key that tells it what should be the format. Now try 2 and see the result. 

    The four keys are listed below 

    • 0 - Default date time
    • 1 - Long Date 
    • 2 - Short Date
    • 3 - Long Time
    • 4 - Short Time

    Now, that wasn't hard to write. If you have windows 98 personal web server is in your CD. If you have a server then you have IIS. Sites like www.brinkster.com can give you space for free. It is where I practiced my first ASP. You can do wonders with small lines, if you are willing to make the effort. 

    I have asked Bryce Yupanqui to do some tutorials. She has done miracles with virtual technology and also posted on the projects a tool that parses the angle brackets <>. It should save you time changing the brackets to < and > ( less than and greater than)

    One last word, ASP does not care for capital or small letters, but it would be good to be consistent if possible.

    Lessons will continue according to table of contents. Use the next page and previous page navigator on this book.



    Page 2


    NEXT:
    PREV: 1.1 ASP - Hello World
Rome - Rome, Season 1 - The Stolen Eagle


Copyright 2002-2011 AncientWorlds LLC | Code of Conduct and Terms of Service | Contact Us! | The AncientWorlds Staff