Share via

Active Server Pages

Before we talk about exactly what Active Server Pages (ASP) are, imagine being able to have users request information from your database over the Internet. Recall that the Internet is a huge client-server architecture. The client is the web browser. It is requesting a web page, data, a file, or whatever from some computer somewhere - anywhere - in the world. The server is that computer that holds the information you want. It serves the data back to the requesting client.

For example, let's say that you wanted to display information to a user about several book titles that were published by Wrox. Well, you could take the request from the user (though a web browser client) and then use ADO on your server to actually retrieve the information from your database.

But then what? How can we take the information from the recordset that we created and send it back to the user's browser? After all, each and every request will probably have different values, records, etc. Each request can be unique.

Servers send information to web surfer clients using Hyper Text Markup Language (HTML). And HTML is static. In some ways, HTML is like the page of a book: once the page is printed, it's tough to change. Likewise, once an HTML page is built to send from a client to a server, it's static and unchanging. But we want to use HTML because every browser on the planet can understand it. So how in the world can we use HTML on one hand but provide dynamic information on the other?

Well, that's where Active Server Pages come in. By using ADO to get the information from a database we then use ASP to actually format the page, in-flight, while the application is running. We package up the information that the client requests and transmit it to them. We have no way of knowing precisely what a user will ask for on each visit to our site, so we use ASP to take their requests and dynamically generate an HTML-coded web page to display to them. This way, we can easily send back a unique HTML page that looks like this:

Cool, eh? And you will be surprised at how easy it is. Don't worry, we are going to walk through each and every step. So by the end of the chapter you will be comfortable with creating your own ASP pages using some of the more advanced features of ADO. You will be able to do this in the comfort of your own PC - without any fancy server. Your PC and an Internet connection are all that you will need. Interested?

Let's begin by reviewing some important Internet technologies. We'll start with the language used to create web pages – HTML.

© 1998 by Wrox Press. All rights reserved.