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

Please visit our partners

Windows Technology Windows Technology
15 Seconds
ASP 101
ASP Wire
VB Forums
VB Wire
internet.commerce internet.commerce
Partners & Affiliates

ASP 101 is an site
ASP 101 is an site
Internet News
Small Business
Personal Technology

Corporate Info
Tech Jobs
E-mail Offers

ASP 101 News Flash ASP 101 News Flash

ASP 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 blue text and ASP comments are green text.
HTML 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.
HTML 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!

In order to begin introducing our users to some of the exciting new features and coding style of ASP.NET, we're publishing ASP.NET versions of a number of our existing samples which will be indicated by this symbol. We feel the benefits to this approach are two-fold.
  1. You get some exposure to ASP.NET code (obviously)
  2. You get to compare the two sets of code and see the differences for yourself

Sample Name Description ASP.NET Complexity
Ad Rotator The Ad Rotator component does all the hard work for you.
ADO to XML Save a recordset as an XML file using ADO.
Alternating Colors For when you want alternating colored table rows.
Array (1D) Sometimes one value per variable just isn't enough.
Barcode Generate code 39 symbology barcodes for use on your web pages.
Bar Chart Turn those numbers into something useful!
Stacked Bar Chart A stacked version!  
ByRef vs. ByVal Passing parameters by reference or by value.
Calendar Darn, what day is my birthday on in 2010? I need to start planning!
Cases Demonstrates how to create and select a Case.
Checkbox Find out how to handle checkboxes like a pro.
Checkbox to Database Displaying and saving boolean data via a checkbox.  
Colors All the colors of the (color-safe palette) rainbow.
Color Chooser Sometimes it's nice to see the colors.
Cookies No cookie monsters here.
Customization Let users customize their view of your site.
Simple Database Uses info from a database table to build an HTML table.
Database Accessing an Access database.
Database Add Part 1 of our DB editing trilogy: Add!
Database Delete Part 2: The Delete Strikes Back!
Database Update Part 3: Return of the Update!
Database Count How to get a RecordCount that doesn't return -1!
Database Editing Add, delete, and edit from one script.
Database GetRows Get all your recordset rows at once!  
Database GetString No more looping through recordsets!  
Database Highlight A virtual highlighter to make reading database data easier.
Database Paging Previous 10, Next 10... you know you want it!
Database Pulldown Fill your pulldowns with data from a Database!
Database Pulldown (Linked) Modify a pulldown's options based on other input.
DB Record Killer A version of our DB Delete script on steroids.
Database Search Perform a simple text search on a database.
Database Paged Search Two cool DB scripts rolled into one!
Database Search (Multi-Term) Learn how to search for multiple query terms.
Database Sort Sort data tables simply by clicking.
Database Sort (Multi) Now you can sort by multiple fields.
Database Transactions When you need to be sure something gets done.
Dictionary Manage key / item pairs with ease.
Directory List Directory browsing made pretty!
Directory List (Sorted) Sort the results of our Dir List script.
Directory List (Filtered) List only the files whose filenames match the text you enter.
Directory List (Click to Sort) Let your users sort file listings any way they want.  
Directory List to Recordset Use a Recordset to manipulate non-database data.
Download Get that download dialog box to pop up.
Dynamic Form Fields It pays to be flexible when designing forms to get mystery data.
E-mail How to send an e-mail message from your web server using CDO.
E-mail (HTML) Send email messages as lively as a web page.
E-mail (with Attachment) Attach files to the messages you send.
ElseIf No, it's not a typo...
Error Handling You can't prevent errors, but you can prevent users from seeing them.
Excel Use Excel as a client-side data viewer.
Excel Data There actually are reasons why you'd want to do this!
File Attributes Check to see which attributes a file has set.
File Exists Check to see if a file exists on the server's file system.
Flex Table A flexible table with paging support!
Form Handler Some light form validation and error notification.
Form to DB Insert records retrieved from a form into a database.
Form ViewState Persisting form values in classic ASP may be a pain, but someone's got to do it.
Functions A basic use of a function that can save redundant code.
Get vs. Post The age-old debate examined via ASP.
Greeting Greet your user based on the time of day.
Guestbook Let your guests sign in.
Reverse Guestbook (Compatible) A guestbook where new entries go on top. (Same file format as guestbook.asp)
Reverse Guestbook (Faster) A guestbook where new entries go on top. (New file format and more efficient)  
Hangman Just hanging around!  
Hello World The classic beginning script for any language implemented in ASP.
Hit Counter Count hits to your pages.
Hit Counter (DB) Another hit counter, but using a database instead of text files.
Http Request Sometimes it's helpful to get data from other servers... here's how.
Http Request (WinHTTP v5.0) Make requests using MS's WinHTTP v5.0.  
Http Request (Cached) I simply can't overstate the importance of caching data retrieved via HTTP requests.
Http Request (Post Method) Post form data to a remote server behind the scenes.
Image Flip Apply transformations to an image before sending it to the browser.  
Last Modified Get the last modified date from your ASP files.
Link Manager Manage the links on your page from your browser!  
Login & Password Secure an ASP page simply and easily.
Min / Max The highs and lows of ASP coding!
Multiple Selections Why limit your users to one choice... let em choose away!
Name Tag Add text to an image before serving it to the browser.  
Output Response.Write, Carriage Returns, vbCrLf, and more fun stuff!
Page Timer How long are people spending filling out your forms?
Phone Message A virtual "While You Were Out" pad.  
Phone Number Format your phone numbers so they're all uniform.
Photo Gallery Show your photos with style.
Poll Poll your users. It's like the quiz, but it's not!
Progress Bar Are we there yet.... how much longer?
Proper Case There's LCase and UCase... and now PCase!
Pulldown Navigation Navigate around your site using a pulldown box!
Quiz Test your visitors' knowledge!  
Radio Button Not quite like the ones in your parents' old car.
Random Number Generate a random number using ASP.
Random Image Not 1 or 2, but 3 ways to display a random image!
Server.Execute Relax... we're not going to kill your server!
Server Variables Find out what your clients are telling you.
Shopping Cart Let's go shopping. Cool ASP 101 merchandise!  
Source Code View source code of the script that lets you view our source code.
Stored Procs Using SQL Server's stored procedures isn't that hard.
Stored Queries (Access) They're not quite stored procedures, but they do work.
Tell a Friend Have users tell their friends about a resource on your site.
Text Files Learning to read and write all over again.
Text File Search Search for a specific phrase in a text file.
Universal DB Viewer View any database on the web. Just plug in your DSN and go!  
URL Linker Automatically link every http:// in a string
Variable Types Type mismatch?... but I thought everything was a variant.
Web Log A simple web log for adding news links to your site.
Wizard Break complex tasks into smaller, easy to manage pieces.
Word Count Counts the words and characters in a string.
Word Wrap Word wrap your text for emailing or pre tags.
XML to HTML (via XSL) Use a XSL stylesheet to apply transformations to an XML file.
Year 2000 If the cookie monster didn't scare you this should.

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.

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.

For those of you who keep asking if you can use the code read this.

Home |  News |  Samples |  Articles |  Lessons |  Resources |  Forum |  Links |  Search |  Feedback
The Network for Technology Professionals



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