JAG

James Griffiths Ltd

Active Server Pages

Examples



PDA Version

Active Server Pages

Using Active Server pages allows web pages to be interactive with the user and with databases. The script is processed on the server. Depending on the choices and responses of the user, the data can be looked up and gathered, then presented to the user as a normal HTML page.

Since the page is presented as HTML, there is normally no need to worry if the user's browser supports the script being used.

You can however use server script to write client script to the web page as well as HTML. In this case you must be sure that the user's browser will either support the script or at least handle the fact that it doesn't gracefully. The Client Script and Spreadsheet examples, on the right, both make use of this technique.

With Office 2000 or later, you can embed fully working office documents. The Spreadsheet example shows how a spreadsheet, pre-loaded with data from a database, in a web page. Users can enter their own data and formulas into the spreadsheet to test various scenarios. They can save the spreadsheet for themselves. They could also, then choose to upload their data, after testing in the spreadsheet, to the database. Other users would then see the modified data when they opened the spreadsheet. The changes a user makes to the spreadsheet itself are not saved, clicking the browser's Refresh button will cause a fresh version of the spreadsheet to be shown. Access reports can can also be done in a similar way.

Telephone List

This example uses the employees from Microsoft's Northwind sample database. It allows employees to be searched for, by surname, and presents their details along with a photograph.

Client Script

To see an example of using ASP to write client script, enter some text in the box below then click the Submit button.

Spreadsheet

This example displays a working Excel spreadsheet preloaded with data that users can change to test various scenarios. NOTE: You must have I.E. 4.0 and Excel 2000 or later for this example to work.

Tabulated Data

Data from a database presented in a table.

Sales Report

A printable sales report with the data subtotalled by customer.

Inventory Report

A printable inventory report sorted by category.

Adding Data

This example shows how data can be added via an internet/intranet web page.

Data Drilldown

An example of drilling down through items on web page.

Copyright © James Griffiths Ltd 2000-2005