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