ASP 101 - Active Server Pages 101 - Web01
The Place ASP Developers Go!



Windows Technology Windows Technology
15 Seconds
4GuysFromRolla.com
ASP 101
ASP Wire
VB Forums
VB Wire
WinDrivers.com
internet.commerce internet.commerce
Partners & Affiliates
ASP 101 is an
internet.com site
ASP 101 is an internet.com site
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

ASP 101 News Flash ASP 101 News Flash





Sample HTML Code generated by the ASP:
<IMG SRC="../images/h_samples.gif" BORDER=0 WIDTH=186 HEIGHT=50 ALT="Samples">
<HR SIZE=3 COLOR="blue">
<TABLE BORDER=0>
<TR>
	<TD ALIGN="center">
	<A HREF="./viewasp.asp?file=index.asp">
	<IMG SRC="./images/viewasp.gif" WIDTH=50 HEIGHT=32 BORDER=0 ALT="ASP"></A>
	</TD>
	<TD>
	Wherever you see this image you can click on it to see
	the actual ASP code that generated the corresponding page.
	So it stands out, ASP code is displayed as
	<FONT COLOR=#0000FF>blue text</FONT> and ASP comments are
	<FONT COLOR=#009900>green text</FONT>.
	</TD>
</TR>
<TR>
	<TD ALIGN="center">
	<A HREF="./viewhtml.asp?file=index.asp">
	<IMG SRC="./images/viewhtml.gif" WIDTH=50 HEIGHT=32 BORDER=0 ALT="HTML"></A>
	</TD>
	<TD>
	Likewise where you see this image you can click on it to
	see a previously run sample of HTML that was generated by
	the script.
	</TD>
</TR>
<TR>
	<TD ALIGN="center">
	<A HREF="./download.asp?file=index.asp">
	<IMG SRC="./images/download.gif" WIDTH=86 HEIGHT=32 BORDER=0 ALT="HTML"></A>
	</TD>
	<TD>
	Due to popular demand, when you click on this image, you'll
	get	a plain	text version of the script.  You can either save
	the whole file or cut and paste it directly into your own script!
	</TD>
</TR>
</TABLE>
<BR>
<TABLE BORDER=10 CELLSPACING=0 CELLPADDING=1 BORDERCOLOR=#33CC33 BORDERCOLORLIGHT=#00CC66 BORDERCOLORDARK=#006600>
<TR BGCOLOR=#009900>
	<TD BGCOLOR=#009900><FONT COLOR=#FFFFFF><B>Sample Name</B></FONT></TD>
	<TD BGCOLOR=#009900><FONT COLOR=#FFFFFF><B>Description</B></FONT></TD>
	<TD BGCOLOR=#009900><FONT COLOR=#FFFFFF><B>Complexity</B></FONT></TD>
</TR>
<TR>
	<TD><A HREF="./bar_chart.asp">Bar Chart</A></TD>
	<TD>Turn those numbers into something useful!</TD>
	<TD><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26></TD>
</TR>
<TR>
	<TD><A HREF="./calendar.asp">Calendar</A></TD>
	<TD>Darn, what day is my birthday on in 2010? I need to start planning!</TD>
	<TD><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26></TD>
</TR>
<TR>
	<TD><A HREF="./case.asp">Cases</A></TD>
	<TD>Demonstrates how to create and select a Case.</TD>
	<TD><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26></TD>
</TR>
<TR>
	<TD><A HREF="./colors.asp">Colors</A></TD>
	<TD>All the colors of the (color-safe palette) rainbow.</TD>
	<TD><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26></TD>
</TR>
<TR>
	<TD><A HREF="./cookie.asp">Cookies</A></TD>
	<TD>No cookie monsters here.</TD>
	<TD><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26></TD>
</TR>
<TR>
	<TD><A HREF="./database.asp">Database</A></TD>
	<TD>Accessing an Access database.</TD>
	<TD><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26></TD>
</TR>
<TR>
	<TD><A HREF="./db_add.asp">Database Add</A></TD>
	<TD>Part 1 of our DB editing trilogy: Add!</TD>
	<TD><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26></TD>
</TR>
<TR>
	<TD><A HREF="./db_del.asp">Database Delete</A></TD>
	<TD>Part 2: The Delete Strikes Back!</TD>
	<TD><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26></TD>
</TR>
<TR>
	<TD><A HREF="./db_update.asp">Database Update</A></TD>
	<TD>Part 3: Return of the Update!</TD>
	<TD><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26></TD>
</TR>
<TR>
	<TD><A HREF="./db_count.asp">Database Count</A></TD>
	<TD>How to get a RecordCount that doesn't return -1!</TD>
	<TD><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26></TD>
</TR>
<TR>
	<TD><A HREF="./db_paging.asp">Database Paging</A></TD>
	<TD>Previous 10, Next 10... you know you want it!</TD>
	<TD><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26></TD>
</TR>
<TR>
	<TD><A HREF="./db_pulldown.asp">Database Pulldown</A></TD>
	<TD>Fill your pulldowns with data from a Database!</TD>
	<TD><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26></TD>
</TR>
<TR>
	<TD><A HREF="./dir_list.asp">Directory List</A></TD>
	<TD>Directory browsing made pretty!</TD>
	<TD><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26></TD>
</TR>
<TR>
	<TD><A HREF="./email_cdo.asp">E-mail</A></TD>
	<TD>How to send an e-mail message from your web server using CDO.</TD>
	<TD><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26></TD>
</TR>
<TR>
	<TD><A HREF="./form_handler.asp">Form Handler</A></TD>
	<TD>Some light form validation and error notification.</TD>
	<TD><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26></TD>
</TR>
<TR>
	<TD><A HREF="./form_to_db.asp">Form to DB</A></TD>
	<TD>Insert records retrieved from a form into a database</TD>
	<TD><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26></TD>
</TR>
<TR>
	<TD><A HREF="./function.asp">Functions</A></TD>
	<TD>A basic use of a function that can save redundant code.</TD>
	<TD><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26></TD>
</TR>
<TR>
	<TD><A HREF="./getpost.asp">Get vs. Post</A></TD>
	<TD>The age-old debate examined via ASP.</TD>
	<TD><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26></TD>
</TR>
<TR>
	<TD><A HREF="./welcome.asp">Greeting</A></TD>
	<TD>Greet your user based on the time of day.</TD>
	<TD><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26></TD>
</TR>
<TR>
	<TD><A HREF="./guestbook.asp">Guestbook</A></TD>
	<TD>Let your guests sign in.</TD>
	<TD><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26></TD>
</TR>
<TR>
	<TD><A HREF="./hangman.asp">Hangman</A></TD>
	<TD>Just hanging around!</TD>
	<TD><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26></TD>
</TR>
<TR>
	<TD><A HREF="./counter.asp">Hit Counter</A></TD>
	<TD>Count hits to you pages.</TD>
	<TD><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26></TD>
</TR>
<TR>
	<TD><A HREF="./world.asp">Hello World</A></TD>
	<TD>The classic beginning script for any language implemented in ASP.</TD>
	<TD><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26></TD>
</TR>
<TR>
	<TD><A HREF="./modified.asp">Last Modified</A></TD>
	<TD>Get the last modified date from your ASP files.</TD>
	<TD><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26></TD>
</TR>
<TR>
	<TD><A HREF="./links.asp">Link Manager</A></TD>
	<TD>Manage the links on your page from your browser!</TD>
	<TD><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26></TD>
</TR>
<TR>
	<TD><A HREF="./login.asp">Login & Password</A></TD>
	<TD>Secure an ASP page simply and easily.</TD>
	<TD><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26></TD>
</TR>
<TR>
	<TD><A HREF="./min-max.asp">Min / Max</A></TD>
	<TD>The highs and lows of ASP coding!</TD>
	<TD><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26></TD>
</TR>
<TR>
	<TD><A HREF="./multiple_selection.asp">Multiple Selections</A></TD>
	<TD>Why limit your users to one choice... let em choose away!</TD>
	<TD><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26></TD>
</TR>
<TR>
	<TD><A HREF="./output.asp">Output</A></TD>
	<TD>Response.Write, Carriage Returns, vbCrLf, and more fun stuff!</TD>
	<TD><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26></TD>
</TR>
<TR>
	<TD><A HREF="./time.asp">Page Timer</A></TD>
	<TD>How long are people spending filling out your forms?</TD>
	<TD><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26></TD>
</TR>
<TR>
	<TD><A HREF="./phone_format.asp">Phone Number</A></TD>
	<TD>Format your phone numbers so they're all uniform.</TD>
	<TD><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26></TD>
</TR>
<TR>
	<TD><A HREF="./polls.asp">Poll</A></TD>
	<TD>Poll your users. It's like the quiz, but it's not!</TD>
	<TD><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26></TD>
</TR>
<TR>
	<TD><A HREF="./pcase.asp">Proper Case</A></TD>
	<TD>There's LCase and UCase... and now PCase!</TD>
	<TD><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26></TD>
</TR>
<TR>
	<TD><A HREF="./pulldown_nav.asp">Pulldown Navigation</A></TD>
	<TD>Navigate around your site using a pulldown box!</TD>
	<TD><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26></TD>
</TR>
<TR>
	<TD><A HREF="./quiz.asp">Quiz</A></TD>
	<TD>Test your visitors' knowledge!</TD>
	<TD><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26></TD>
</TR>
<TR>
	<TD><A HREF="./random_number.asp">Random Number</A></TD>
	<TD>Generate a random number using ASP.</TD>
	<TD><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26></TD>
</TR>
<TR>
	<TD><A HREF="./servvars.asp">Server Variables</A></TD>
	<TD>Find out what your clients are telling you.</TD>
	<TD><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26></TD>
</TR>
<TR>
	<TD><A HREF="./shopping.asp">Shopping Cart</A></TD>
	<TD>Let's go shopping. Cool ASP 101 merchandise!</TD>
	<TD><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26></TD>
</TR>
<TR>
	<TD><A HREF="./source.asp">Source Code</A></TD>
	<TD>View source code of the script that lets you view our source code.</TD>
	<TD><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26></TD>
</TR>
<TR>
	<TD><A HREF="./tell_a_friend.asp">Tell a Friend</A></TD>
	<TD>Have users tell their friends about a resource on your site.  <IMG SRC="../images/new.gif"></TD>
	<TD><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26></TD>
</TR>
<TR>
	<TD><A HREF="./textfile.asp">Text Files</A></TD>
	<TD>Learning to read and write all over again.</TD>
	<TD><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26></TD>
</TR>
<TR>
	<TD><A HREF="./db_dsn.asp">Universal DB Viewer</A></TD>
	<TD>View any database on the web. Just plug in your DSN and go!</TD>
	<TD><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26></TD>
</TR>
<TR>
	<TD><A HREF="./url_linker.asp">URL Linker</A></TD>
	<TD>Automatically link every http:// in a string</TD>
	<TD><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26></TD>
</TR>
<TR>
	<TD><A HREF="./var_types.asp">Variable Types</A></TD>
	<TD>Type mismatch?... but I thought everything was a variant.</TD>
	<TD><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26></TD>
</TR>
<TR>
	<TD><A HREF="./y2k.asp">Year 2000</A></TD>
	<TD>If the cookie monster didn't scare you this should.</TD>
	<TD><IMG SRC="./images/vbscript.gif" WIDTH=22 HEIGHT=26></TD>
</TR>
</TABLE>
<BR>
<P>These samples are placed here for your reference.
Each one will give you sample output, the .asp source file,
and the .htm file that is generated when a user runs the .asp
script.  This code is strictly for the sake of illustration.
Most of it includes little to no error handling and we therefore
cannot be held responsible for anything it may do when run on
your server.</P>
<P>Having said that, we will not intentionally place any malicious
code here and will try and warn you of anything a script may do
which might be unexpected (ie. writing to the server's hard drive).
Still, if you do encounter any errors or side effects when attempting
to run any of our code, please let us know and we'll do our best to
assist you in getting it to run correctly and update our example
with the appropriate fix and/or warning.</P>
<!--<P>Wheh! Now to the fun part .... the code.</P>-->
<P>
For those of you who keep asking if you can use the code
<A HREF="license.asp">read this</A>.
</P>


Output

Samples
Home |  News |  Samples |  Articles |  Lessons |  Resources |  Forum |  Links |  Search |  Feedback

Internet.com
The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers