2/22/00J. Alberto Espinosa -- CMU/GSIA MIS 45-870 1 Dynamic HTML Using Active Server Pages (ASP) Alberto Espinosa MIS 45-870.

Slides:



Advertisements
Similar presentations
WEB DESIGN TABLES, PAGE LAYOUT AND FORMS. Page Layout Page Layout is an important part of web design Why do you think your page layout is important?
Advertisements

Languages for Dynamic Web Documents
Copyright 2004 Monash University IMS5401 Web-based Systems Development Topic 2: Elements of the Web (g) Interactivity.
1 Chapter 12 Working With Access 2000 on the Internet.
Session 6 Server-side programming - ASP. An ASP page is an HTML page interspersed with server-side code. The.ASP extension instead of.HTM denotes server-side.
Mark Dixon, SoCCE SOFT 131Page 1 20 – Web applications: HTML and Client-side code.
Tutorial 6 Working with Web Forms
Introduction to Web Database Processing
4/8/99 C. Edward Chow Page 1 Active Server Page It is a server-side scripting environment for creating dynamic content. ASP are files with.asp extension,
Introduction to Web Interface Technology (CSE2030)
Tuesday, February 22, Management of Information Systems: Mini-3 Spring 2000.
4/8/99 C. Edward Chow Page 1 Internet Services Manager Click Start | Programs | Administrative Tools | Internet Services Manager.
How Clients and Servers Work Together. Objectives Learn about the interaction of clients and servers Explore the features and functions of Web servers.
Tutorial 6 Working with Web Forms. XP Objectives Explore how Web forms interact with Web servers Create form elements Create field sets and legends Create.
Tutorial 6 Forms Section A - Working with Forms in JavaScript.
McGraw-Hill/Irwin © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Beginning Active Server Pages Barry Sosinsky Valda Hilley Programming.
Chapter 9 Collecting Data with Forms. A form on a web page consists of form objects such as text boxes or radio buttons into which users type information.
Server Side Scripting Norman White. Where do we do processing? Client side – Javascript (embed code in html) – Java applets (send java program to run.
INTRODUCTION TO WEB DATABASE PROGRAMMING
1 Homework / Exam Exam 3 –Solutions Posted –Questions? HW8 due next class Final Exam –See posted schedule Websites on UNIX systems Course Evaluations.
 2000 Deitel & Associates, Inc. All rights reserved. Chapter 24 – Web Servers (PWS, IIS, Apache, Jigsaw) Outline 24.1Introduction 24.2Microsoft Personal.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
MSSQL & ASP. Client-Server Relationship Client-Server Relationship HTML Basics HTML Basics Scripting Basics Scripting Basics Examples Examples.
Server- Side technologies Client-side vs. Server-side scripts PHP basic ASP.NET basic ColdFusion.
1 CS 3870/CS 5870 Static and Dynamic Web Pages ASP.NET and IIS.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
A U Course Introduction, Dynamic Web Pages & Scripting Professor J. Alberto Espinosa ITEC 334 Fall 2010 Online (Business) Application Development.
XP Tutorial 6New Perspectives on HTML and XHTML, Comprehensive 1 Creating Web Page Forms Designing a Product Registration Form Tutorial 6.
1 Creating Web Forms in HTML Web forms collect information from customers Web forms include different control elements including: –Input boxes –Selection.
1 CS 3870/CS 5870 Static and Dynamic Web Pages ASP.NET and IIS.
Dr. Azeddine Chikh IS444: Modern tools for applications development.
© 2011 Delmar, Cengage Learning Chapter 9 Collecting Data with Forms.
Server-side Scripting Powering the webs favourite services.
4-1 INTERNET DATABASE CONNECTOR Colorado Technical University IT420 Tim Peterson.
Basics of Web Databases With the advent of Web database technology, Web pages are no longer static, but dynamic with connection to a back-end database.
Data-Enabled Web Sites: Classibooks.com & Internet Database Technologies Colin Fukai April 4, 2000 Gonzaga University.
Chapter 6 The World Wide Web. Web Pages Each page is an interactive multimedia publication It can include: text, graphics, music and videos Pages are.
HOW WEB SERVER WORKS? By- PUSHPENDU MONDAL RAJAT CHAUHAN RAHUL YADAV RANJIT MEENA RAHUL TYAGI.
1 In the good old days... Years ago… the WWW was made up of (mostly) static documents. –Each URL corresponded to a single file stored on some hard disk.
Web Server Administration Chapter 7 Installing and Testing a Programming Environment.
Creating Dynamic Web Pages Using PHP and MySQL CS 320.
Web Pages with Features. Features on Web Pages Interactive Pages –Shows current date, get server’s IP, interactive quizzes Processing Forms –Serach a.
Active Server Pages  In this chapter, you will learn:  How browsers and servers interacted on the Internet when the Internet first became popular 
Chapter 8 Collecting Data with Forms. Chapter 8 Lessons Introduction 1.Plan and create a form 2.Edit and format a form 3.Work with form objects 4.Test.
Website Development with PHP and MySQL Saving Data.
1 © Netskills Quality Internet Training, University of Newcastle HTML Forms © Netskills, Quality Internet Training, University of Newcastle Netskills is.
ITCS373: Internet Technology Lecture 5: More HTML.
Tutorial 6 Working with Web Forms. XP Objectives Explore how Web forms interact with Web servers Create form elements Create field sets and legends Create.
Tutorial 6 Working with Web Forms. 2New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives Explore how Web forms interact with.
1 MSCS 237 Overview of web technologies (A specific type of distributed systems)
Web Pages with Features. Features on Web Pages Interactive Pages –Shows current date, get server’s IP, interactive quizzes Processing Forms –Serach a.
ASP (Active Server Pages) by Bülent & Resul. Presentation Outline Introduction What is an ASP file? How does ASP work? What can ASP do? Differences Between.
1 WWW. 2 World Wide Web Major application protocol used on the Internet Simple interface Two concepts –Point –Click.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
Tutorial 6 Working with Web Forms. 2New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives Explore how Web forms interact with.
Form Processing Week Four. Form Processing Concepts The principal tool used to process Web forms stored on UNIX servers is a CGI (Common Gateway Interface)
ASP. ASP is a powerful tool for making dynamic and interactive Web pages An ASP file can contain text, HTML tags and scripts. Scripts in an ASP file are.
ASP-2-1 SERVER AND CLIENT SIDE SCRITPING Colorado Technical University IT420 Tim Peterson.
Higher Computing Science Coding the Web: HTML, JavaScript, PHP and MySQL.
COSC 2328 – Web Programming.  PHP is a server scripting language  It’s widely-used and free  It’s an alternative to Microsoft’s ASP and Ruby  PHP.
Web Page Designing With Dreamweaver MX\Session 1\1 of 9 Session 1 Introduction to PHP Hypertext Preprocessor - PHP.
FORMS Explained By: Jasdeep Kaur. Lecturer, Department of Computer Application, PGG.C.G., Sector: 42, Chandigarh.
G046 – Lecture 2A Recognising Web-Technologies Mr C Johnston ICT Teacher
1 Chapter 1 INTRODUCTION TO WEB. 2 Objectives In this chapter, you will: Become familiar with the architecture of the World Wide Web Learn about communication.
Section 17.1 Section 17.2 Add an audio file using HTML
PHP / MySQL Introduction
Database Driven Websites
Chapter 27 WWW and HTTP.
Introduction to JavaScript
Presentation transcript:

2/22/00J. Alberto Espinosa -- CMU/GSIA MIS Dynamic HTML Using Active Server Pages (ASP) Alberto Espinosa MIS

2/22/00J. Alberto Espinosa -- CMU/GSIA MIS Static HTML and the HTTP Protocol HTTP  designed as a doc fetching protocol: 1. User clicks on URL with HTTP protocol 2. Browser requests HTML page to web site 3. Server finds/sends HTML page to client “as is” 4. Client’s browser interprets HTML and presents page to user

2/22/00J. Alberto Espinosa -- CMU/GSIA MIS Dynamic HTML Overcoming HTTP Shortcomings HTML is static: text (info) and tags (formatting) Corporate information is dynamic If info changes  HTML pages need to change How to customize displays for different users?

2/22/00J. Alberto Espinosa -- CMU/GSIA MIS Dynamic HTML 2 Solutions to Static HTML 1. Client side scripting Further processing by browser after page is received 2. Server side scripting Prior processing by web server before page is sent

2/22/00J. Alberto Espinosa -- CMU/GSIA MIS Client Side Scripting Useful for interactive use with user Browser needs to support the scripting language used Most popular: JavaScript, VB Script Embed scripts in HTML page HTML stuff script code ………… More HTML stuff

2/22/00J. Alberto Espinosa -- CMU/GSIA MIS Server Side Scripting Useful to interact with data stored on the server (databases, images, etc.) And when centralized processing is needed Sever needs to support the scripting language Most popular: CGI  Perl (Unix) ASP  VB Script or JScript (Windows)

2/22/00J. Alberto Espinosa -- CMU/GSIA MIS Server Side Scripting (cont’d) Embedded scripts in HTML page HTML code <% (marks the beginning of ASP script) ………..………. ASP script code ……………….... %> (marks the end of ASP script) More HTML code Etc.

2/22/00J. Alberto Espinosa -- CMU/GSIA MIS Dynamic HTML with ASP 1. Client clicks on URL with.asp file 2. Web server notices file extension.asp Note: Only Windows NT IIS web server supports ASP 3. Server then processes.asp file 4. Server creates a new HTML file 5. Contains all original HTML stuff 6. Plus processing results from ASP code 7. Dynamically formatted as HTML 8. Server sends the new HTML file to client

2/22/00J. Alberto Espinosa -- CMU/GSIA MIS Dynamic HTML with ASP Welcome to my page Here is my product list <% ‘Start ASP code Open a database connection SQL queries to database Copy results to a record set Display records one at a time Close database connection %> ‘End ASP code Thank you very much for inquiring about our products Welcome to my page Here is my product list Product Price Hammer ……... $8.50 Pliers ……….… $7.79 Screwdriver..… $4.50 Power Drill ….. $49.99 Chainsaw …… $95.95 Wrench ……….. $6.50 Thank you very much for inquiring about our products ASP code on serverHTML code sent to client Same Dynamically generated by ASP

2/22/00J. Alberto Espinosa -- CMU/GSIA MIS ASP, SQL, Databases, and HTML Web Server MS IIS Web Server Client Browser Internet Explorer Netscape Navigator HTML ASP Databases HTML Request HTML doc Fetched ASP Request SQL Query Query Results Dynamic HTML Produced On-the-Fly

2/22/00J. Alberto Espinosa -- CMU/GSIA MIS Server Requirements You can’t do ASP on Andrew ASP requires an MS Windows environment –NT Server with Internet Information Server –NT Workstation with “Peer Web Services” (10-user connection limit) –Win95/98 with Personal Web Server

2/22/00J. Alberto Espinosa -- CMU/GSIA MIS Common Uses of ASP Register as a client (insert a record in database) Products & services listing (query database) Place orders (inserting records in database) Track order status (query database) Tech support (query a knowledge base) Fill out a survey (insert record(s) in database)

2/22/00J. Alberto Espinosa -- CMU/GSIA MIS Very Common Feed data to an ASP script using HTML forms This is typically what the “Submit” button does HTML forms contain items data with field names Which are passed to ASP scripts for processing Often used to embed an SQL command To query a database (product list, etc.) Or to insert records in a database (orders, etc.)

2/22/00J. Alberto Espinosa -- CMU/GSIA MIS Example--ASP on Server (Query) <% Set conn = Server.CreateObject("ADODB.Connection") conn.open "orders " Set rs_customers = Conn.Execute("SELECT clientID, clientName,_ shipAddress, telephone FROM clients") %> Alberto's Music Instruments, Inc. Customer List ClientID Client Name Shipping Address Telephone <% rs_customers.MoveNext loop Conn.Close %>

2/22/00J. Alberto Espinosa -- CMU/GSIA MIS Example--Response to Browser Alberto's Music Instruments, Inc. Customer List ClientID Client Name Shipping Address Telephone josee Alberto Espinosa Schenley Park, GSIA Building, # sandy Sandra Slaughter 5000 Forbes Avenue, Pittsburgh PA etc.

2/22/00J. Alberto Espinosa -- CMU/GSIA MIS Example--ASP on Server (Data Input) Customer Registration <FORM ACTION= " METHOD="POST" ENCTYPE="x-www-form-urlencoded"> Please enter a customer ID (4 to 16 characters) Please enter your name etc.

2/22/00J. Alberto Espinosa -- CMU/GSIA MIS Example--ASP on Server (Data Input) <% Set conn = Server.CreateObject("ADODB.Connection") conn.open "orders” customerId = Request.Form("customerId") custName = Request.Form("custName") …. etc. Set rs = Conn.Execute("INSERT INTO Clients (ClientID, CustName, _ etc. VALUES ('" & customerID & "', '" & customerName & "', _ '" & shippingAddress & "', '" & phone & "') ") Conn.Close %> Your Customer Registration has been processed! Thank you very much Back to main page

2/22/00J. Alberto Espinosa -- CMU/GSIA MIS

2/22/00J. Alberto Espinosa -- CMU/GSIA MIS IT Exercise III A restaurant food delivery service company Participant restaurants subscribe to service Company developed a web site using ASP to let: 1. Restaurants subscribe and enter menu items 2. Customers place orders Web server runs on Windows NT with IIS Participant restaurants need to produce their HTML pages with order forms Which don’t need to run on IIS (nor ASP) But need to feed data to existing ASP scripts