|
|
|
 |
Starting with ASP
So far I have not shown you one piece of ASP and we are already onto the
fourth page. So it is about time this changed! What we are going to do
here is look at ASP, take some very small first steps and look at the
standard components that come with ASP. This will set you up for the first
proper, in-depth look at ASP in ASP training.
What Does ASP Look Like
ASP uses scripts inside HTML pages to do the work. ASP can use a number
of different flavours of script to do its work, VBScript (Visual Basic
Script), JavaScript and PerlScript are three of the common ones. The whole of
this site was written using VBScript (VBs) and this is what we shall be
using for all of the training. If you want to use a different flavour of
script, the application I will use to training you will provide you with links
to other sites with that contain this information.
A First Script
Below is a first, basic ASP script, I have coloured the ASP specific elements red (and the comments in green)
<%@ LANGUAGE="VBSCRIPT" %>
<HTML>
<HEAD>
<TITLE>Demo ASP page</TITLE>
</HEAD>
<BODY>
<h1>just some standard html</h1>
<%
response.write("using asp to write to the page")
'PROGRAMMERS NOTE
'the line terminator in VBs is the carriage return!
'lets tell everyone what day of the week it is!
'get the current date
currentDate = Date
'extract the day of the week information
weekDayValue = weekday(currentDate)
'work out what the value is in real money
'PROGRAMMERS NOTE
'you could do this with a CASE statement
'so if you feel brave look up the SELECT CASE
'and use that instead of the big if
if weekDayValue = 1 then
weekDayActual = "Sunday"
elseif weekDayValue = 2 then
weekDayActual = "Monday"
elseif weekDayValue = 3 then
weekDayActual = "Tuesday"
elseif weekDayValue = 4 then
weekDayActual = "Wednesday"
elseif weekDayValue = 5 then
weekDayActual = "Thursday"
elseif weekDayValue = 6 then
weekDayActual = "Friday"
elseif weekDayValue = 7 then
weekDayActual = "Saturday"
else
weekDayActual = "Ooops, something's not right here!"
end if
%>
<p>
Today is <b><i><%= weekdayActual %></i></b>
</BODY>
</HTML>
So, a nice and simple ASP script (which you can cut and paste and use on
your own machine if you wish). You
can see this script working on this site.
This script will form the basis of the first part of the ASP training section, and
each detail will be looked at there. For now, the purpose of this script
is to give you an idea of what ASP looks like in the raw! You can see that
the ASP it interlaced with ordinary HTML. You can tell where the ASP
specific stuff starts and ends by the <% (open) and %> (close) tags,
which are very much like the <> and </> tags in HTML (that I hope you
are already familiar with.
Starting with ASP - Part 2 >>
|
 |
 |
|
 |
|
|
|
|
 |
| WebIntellects: Tired of bait and switch hosting? Low cost gimmicks? So are we. See why we are the provider of choice in over 80 countries world-wide! | | | The Planet Hosting: Dedicated Server Deals: As the leading dedicated server hosting provider, The Planet always gives you the best prices on website hosting. See all our deals. | | | US2.net: Offers customers another choice in hosting. Our complete and Plus web hosting packages are generous in specification, with a range of essential features, but best of all at an amazing price. | | | IX Web Hosting.com: As low as $0.81/mo per hosted domain name! FREE Domain Registration, 200,000MB to UNLIMITED Web Space & FREE Website Builder! | | | SuperbHosting.Net: Starting as low as $2.50/m, 2 FREE Domains, FREE Setup + WebSiteCreator + Blog Software, Unlimited Traffic, 200 GB HD, your own IP, 2500 Emails, daily backups & more, connected to our coast-to-coast backbone. | | | $5.95/mo – 6 MONTHS FREE: UNLIMITED Disk Space, UNLIMITED Bandwidth, FREE Domain, FREE Site Builder, FREE Setup, and MORE! | | | Crystaltech.com: Host with the best! 3 FREE months with a waived setup on any new dedicated server! Call 1-877-323-HOST or visit CrystalTech.com today! | | | Hivelocity.com: Core2Duo- $119/mo, Core2Quad- $149/mo, Quad-Core Xeon- $185/mo, Dual Quad-Core Xeon- $299/mo, Zero Setup- Free Ram Upgrades | | | Ace-host.net: 500 GB Disk Space, 5,000 GB Bandwidth, Host up to 20 Domains, Unlimited Email Addresses, 24/7 Technical Support, 99.9% Uptime Guarantee, 30-Day Money Back Guarantee - Starting at $6.95/month | | | Rackspace: Rackspace delivers fully managed windows and linux hosting solutions, a Zero-Downtime Network(tm) and 24x7x365 Fanatical Support(tm). | | | Aplus.Net: AWARD-WINNING Hosting at Small Business-Friendly Prices (from $5.95 / mo.) - FREE Setup - FREE Domain - 99.9% Uptime - 24/7 Support - LIMITED TIME SALE! | | | hostgator.com: CALL NOW 1-866-96-GATOR >> 24/7 >>PHONE AND INSTANT MESSENGER SUPPORT >>A TON OF SPACE!! >>> TONS OF >>BANDWIDTH! >> FREE SETUP >> DOZENS OF FREE SCRIPTS INSTALLED >> | | | Softlayer Technologies: Dedicated Servers, free services & private network; Come to SoftLayer for best in class facilities, technology & customer support | | |
|
 |
|
|
|
|
|
 |
Gogax Hosting
Gogax offers you an ALL Inclusive Premium web hosting package. INSTANT & FREE Setup. 24/7 Customer Support, MANY hosting features ... more
|
|
LYPHA.COM - Recommended
2.5TB Storage, 20TB Transfer - $3.95/mo. Free Domain Name.... more
|
|
Mochahost.com
From $3.71/mo; cPanel, Unlimited mailboxes, Free Site Builder w/ 500+ templates, PHP5, MySQL5, JSP, Ruby, SVN, 20,000 MB space & ... more
|
|
 |
|
|
|
|
|
|
|
|