Title: Active Server Pages
1Active Server Pages
- Corey Skadburg
- Karl Geisler
2Introduction to E-Commerce
- E-Commerce is the buying and selling
- of goods across the Internet.
- E-Commerce web-sites can be as small
- as Campus Book Store or as large as
- Amazon.com.
3E-Commerce Facts
- More than 20 million people are buying
- and selling products and services
- through the Internet.
- U.S. online retail sales will grow from
- 47.8 billion in 2002 to an estimated
- 130.3 billion in 2006.
- Annual spending per buyer will
- increase from 457 in 2001 to 784
- in 2006.
- c
4E-Commerce
5ASP (Active Server Pages)
- What are Active Server Pages?
ASPs are server-generated pages which can call
other programs to do things like access
databases.
ASP pages can be created using a variety of
different languages, the most common being
VBScript.
- What databases can be used with ASP?
Any ODBC database, for example, Access, Oracle,
and SQL Server.
6ASP How it works
- ASP is a program that runs inside of IIS
- IIS Internet Information Services
- IIS Free component with Windows 2000
7What is an ASP File?????
- Basically same as an HTML file
- (file extension .asp)
- File can contain text, HTML,XML, and scripts
- Scripts are executed on the server
8What can ASP do for you?
- Respond to queries by the user, or from data
submitted through a form. - ASP has access to databases and return results
to a browser. - Customize web page to make it more useful for a
user. - ASP is much easier and faster than PERL and CGI.
- Can be viewed in any browser.
9ASP (Active Server Pages)
- Variety of programming languages
- Code Reusability
- No special software required
- Fairly Secure
10ASP (Active Server Pages)
- Microsofts Own Words about ASP
Active Server Pages is an open, compile-free
Application environment in which you can
combine HTML, scripts, and reusable ActiveX
server Components to create dynamic and powerful
Web-based business solutions.
11ASP Example (Using VBscript)
Declare Variables Dim sTopic Dim sQuestion Dim
sSql Dim Conn Dim ConnStr Set conn
Server.CreateObject("ADODB.Connection") ' Create
your connection objectconnStr
"DRIVERMicrosoft Access Driver (.mdb) DBQ"
Server.MapPath("YourDatabase.mdb") Â ' Get
database pathConn.Open connStr  ' Open the
connection to the database sTopicRequest.form("T
opic") ' Set variable to form field
informationsTopicReplace(sTopic,"","No") Â '
Replace the with the number abbreveation
sTopicReplace(sTopic,"'",",") Â ' Replace the '
with  , sQuestionRequest.form("Question")  '
Set variable to form field informationsQuestionR
eplace(sQuestion,"","No") Â ' Replace the with
the number abbreveation sQuestionReplace(sQuesti
on,"'"," ")  ' Replace the ' with  a space
'Create your SQL insert statment sSql "Insert
Into Topics (Topic,Question) " sSqlsSql "
Values('" sTopic "', '" sQuestion "') "
ACTUAL SQL STATEMENT 'Insert Into Topics
(Topic,Question) Â Values (' ASP Examples ', 'How
do I add a record to a database ' )
Conn.Execute sSql  ' insert the new
recordConn.Close  ' Close the database
connection ( this is always a good practice )Set
ConnNothing  'Clear the connection vaiable
12ASP QUESTIONS
- 1. What does ASP stand for?
- a. Active Server Pages
- b. All Secure Pages
- Active Server Protocol
- Any Second Page
13ASP QUESTIONS
2. ASP Can be viewed in any browser. True or
False
14ASP QUESTIONS
- 3. A benefit of ASP is
- a. Variety of Programming languages
- b. Code Reusability
- c. No special software required
- d. All of the above
15ASP Sources
- http//hotwired.lycos.com/webmonkey/98/39/index2a.
html - http//www.w3schools.com/asp/asp_intro.asp
- http//www.datex.net/ecommerce/introduction.htm