ASP. What is ASP? ASP stands for Active Server Pages ASP is a Microsoft Technology ASP is a program that runs inside IIS IIS stands for Internet Information.

Slides:



Advertisements
Similar presentations
PHP I.
Advertisements

UFCE8V-20-3 Information Systems Development 3 (SHAPE HK)
Cookies, Sessions. Server Side Includes You can insert the content of one file into another file before the server executes it, with the require() function.
The Web Warrior Guide to Web Design Technologies
DT211/3 Internet Application Development Active Server Pages & IIS Web server.
Server-Side vs. Client-Side Scripting Languages
1 Chapter 12 Working With Access 2000 on the Internet.
XP Browser and Basics1. XP Browser and Basics2 Learn about Web browser software and Web pages The Web is a collection of files that reside.
ASP Tutorial. What is ASP? ASP (Active Server Pages) is a Microsoft technology that enables you to make dynamic and interactive web pages. –ASP usually.
1 Active Server Pages Active Server Pages (ASPs) are Web pages ASP = server-side scripts + HTML The appearance of an Active Server Page depends on who.
Introduction to Active Server Pages
XP Tutorial 9 New Perspectives on JavaScript, Comprehensive1 Working with Cookies Managing Data in a Web Site Using JavaScript Cookies.
Browser and Basics Tutorial 1. Learn about Web browser software and Web pages The Web is a collection of files that reside on computers, called.
Christopher M. Pascucci Basic Structural Concepts of.NET Browser – Server Interaction.
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.
INTRODUCTION TO WEB DATABASE PROGRAMMING
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
Web Servers Web server software is a product that works with the operating system The server computer can run more than one software product such as .
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
Open Source Server Side Scripting ECA 236 Open Source Server Side Scripting Cookies & Sessions.
Dr. Azeddine Chikh IS444: Modern tools for applications development.
Comp2513 Forms and CGI Server Applications Daniel L. Silver, Ph.D.
Server-side Scripting Powering the webs favourite services.
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.
XP New Perspectives on Browser and Basics Tutorial 1 1 Browser and Basics Tutorial 1.
5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn.
State Management. What is State management Why State management ViewState QueryString Cookies.
Python CGI programming
Tutorial 121 Creating a New Web Forms Page You will find that creating Web Forms is similar to creating traditional Windows applications in Visual Basic.
9 Chapter Nine Compiled Web Server Programs. 9 Chapter Objectives Learn about Common Gateway Interface (CGI) Create CGI programs that generate dynamic.
Introduction to HTML. What is a HTML File?  HTML stands for Hyper Text Markup Language  An HTML file is a text file containing small markup tags  The.
Tutorial 7 Creating Forms. Objectives Session 7.1 – Create an HTML form – Insert fields for text – Add labels for form elements – Create radio buttons.
Database-Driven Web Sites, Second Edition1 Chapter 5 WEB SERVERS.
ASP Introduction Y.-H. Chen International College Ming-Chuan University Fall, 2004.
ASP.NET Programming with C# and SQL Server First Edition Chapter 3 Using Functions, Methods, and Control Structures.
Creating Dynamic Web Pages Using PHP and MySQL CS 320.
Week seven CIT 354 Internet II. 2 Objectives Database_Driven User Authentication Using Cookies Session Basics Summary Homework and Project 2.
Lecture Note 1: Getting Started With ASP.  Introduction to ASP  Introduction to ASP An ASP file can contain text, HTML tags and scripts. Scripts in.
1 Chapter 9 – Cookies, Sessions, FTP, and More spring into PHP 5 by Steven Holzner Slides were developed by Jack Davis College of Information Science.
11 1 Cookies CGI/Perl Programming By Diane Zak Objectives In this chapter, you will: Learn the difference between temporary and persistent cookies.
XP Tutorial 8 Adding Interactivity with ActionScript.
The Problem of State. We will look at… Sometimes web development is just plain weird! Internet / World Wide Web Aspects of their operation The role of.
Web Design and Development. World Wide Web  World Wide Web (WWW or W3), collection of globally distributed text and multimedia documents and files 
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
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.
Unit 1 – Web Concepts Instructor: Brent Presley.
Unit-6 Handling Sessions and Cookies. Concept of Session Session values are store in server side not in user’s machine. A session is available as long.
Session 11: Cookies, Sessions ans Security iNET Academy Open Source Web Development.
XP New Perspectives on Creating Web Pages With Word Tutorial 1 1 Creating Web Pages With Word Tutorial 1.
A S P. Outline  The introduction of ASP  Why we choose ASP  How ASP works  Basic syntax rule of ASP  ASP’S object model  Limitations of ASP  Summary.
ASP Mr. Baha & Dr.Husam Osta  What is ASP?  Internet Information Services  How Does ASP Differ from HTML?  What can ASP do for you?  ASP Basic.
111 State Management Beginning ASP.NET in C# and VB Chapter 4 Pages
ASP – Web Programming Class  Ravi Anand. ASP – Active Server Pages What is ASP? - Microsoft Technology - Can Run using IIS/PWS/Others - Helps us create.
Lecture 6 Sara Almudauh ASP.NET Part 1 Development of Internet Application 1501CT - Sara Almudauh.
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.
JavaScript and Ajax (Ajax Tutorial)
Y.-H. Chen International College Ming-Chuan University Fall, 2004
ASP Explained By: Sarbjit Kaur.
Active Server Pages Computer Science 40S.
Introduction to ASP By “FlyingBono” 2009_01 By FlyingBono 2009_01
19.10 Using Cookies A cookie is a piece of information that’s stored by a server in a text file on a client’s computer to maintain information about.
Chapter 19 PHP Part III Credits: Parts of the slides are based on slides created by textbook authors, P.J. Deitel and H. M. Deitel by Prentice Hall ©
Dynamic Web Page A dynamic web page is a kind of web page that has been prepared with fresh information (content and/or layout), for each individual viewing.
The Request & Response object
Client side & Server side scripting
Chapter 2 Interacting with the Customer
PHP and Forms.
Cookies A cookie is often used to identify a user. A cookie is a small file that the server embeds on the user's computer. Each time the same computer.
Presentation transcript:

ASP

What is ASP? ASP stands for Active Server Pages ASP is a Microsoft Technology ASP is a program that runs inside IIS IIS stands for Internet Information Services PWS (Personal Web Server) is a smaller - but fully functional - version of IIS To run IIS you must have Windows NT 4.0 or later To run PWS you must have Windows 95 or later

ASP file An ASP file is just the same as an HTML file An ASP file can contain text, HTML, XML, and scripts Scripts in an ASP file are executed on the server An ASP file has the file extension ".asp"

What can ASP do for you? Dynamically edit, change, or add any content of a Web page Respond to user queries or data submitted from HTML forms Access any data or databases and return the results to a browser Customize a Web page to make it more useful for individual users Provide security - since ASP code cannot be viewed from the browser Clever ASP programming can minimize the network traffic

IIS - Internet Information Server IIS is a set of Internet-based services for servers created by Microsoft for use with Microsoft Windows. IIS comes with Windows 2000, XP, Vista, and Windows 7. It is also available for Windows NT. IIS is easy to install and ideal for developing and testing web applications.

How to Install IIS on Windows 7 and Windows Vista Follow these steps to install IIS: Open the Control Panel from the Start menu Double-click Programs and Features Click "Turn Windows features on or off" (a link to the left) Select the check box for Internet Information Services (IIS), and click OK

Test Your Web After you have installed IIS or PWS follow these steps: Look for a new folder called Inetpub on your hard drive Open the Inetpub folder, and find a folder named wwwroot Create a new folder, like "MyWeb", under wwwroot Write some ASP code and save the file as "test1.asp" in the new folder Make sure your Web server is running Open your browser and type " to view your first web page

ASP Basic Syntax Rules An ASP file normally contains HTML tags, just like an HTML file. any ASP server script must be surrounded by the symbols

The response.write Command

ASP Variables

Procedures A Sub procedure: is a series of statements, enclosed by the Sub and End Sub statements can perform actions, but does not return a value can take arguments

Procedures Result:

Function Procedure A Function procedure: is a series of statements, enclosed by the Function and End Function statements can perform actions and can return a value can take arguments that are passed to it by a calling procedure without arguments, must include an empty set of parentheses () returns a value by assigning a value to its name

Function A Function procedure can return a result.

ASP OBJECTS RESPONSE: The ASP Response object is used to send output to the user from the server. Property: Buffer: response.Buffer[=Flag ] False indicates no buffering. The server will send the output as it is processed. True indicates buffering. The server will not send output until all of the scripts on the page have been processed, or until the Flush or End method has been called.

Response Methods: Redirect: Redirects the user to a different URL Write: Writes a specified string to the output Clear: Clears any buffered HTML output End: Stops processing a script, and returns the current result Flush: Sends buffered HTML output immediately

Response.clear This is some text I want to send to the user. No, I changed my mind. I want to clear the text. Output: (nothing)

Response.End I am writing some text. This text will never be finished! It's too late to write more! Output: I am writing some text. This text will never be

Request Object The Request object is used to get information from a visitor. Collections: Form Contains all the form (input) values from a form that uses the post method (POST Method) QueryString Contains all the variable values in a HTTP query string (GET Method) ServerVariables Contains all the server variable values

ServerVariables You can loop through all of the server variables like this: ") next %>

ServerVariables You are browsing this site with: Your IP address is: The server's domain name: The server's port: The server's software:

QueryString First name: Last name: plereqquery

QueryString Your name: "" Then Response.Write("Hello " & fname & "! ") Response.Write("How are you today?") End If %> ery

Request.Form First name: Last name: The information received from the form above was: <% If Request.Form("name")<>"" Then Response.Write(" ") Response.Write("name=" & Request.Form("name")) Response.Write(" ") Response.Write("The name property's count is: ") Response.Write(Request.Form(" name").Count) Response.Write(" ") Response.Write("First name=" & Request.Form("name")(1)) Response.Write(" ") Response.Write("Last name=" & Request.Form("name")(2)) Response.Write(" ") End if %>

?filename=demo_form2 ?filename=demo_form2

Cookies A cookie is often used to identify a user. A cookie is a small file that the server embeds on the user's computer. It is a small piece of data sent from a website and stored in a user's web browser while the user is browsing that website.web browser Every time the user loads the website, the browser sends the cookie back to the server to notify the website of the user's previous activity

Cookies With ASP, you can both create and retrieve cookie values. The "Response.Cookies" command is used to create cookies. The Response.Cookies command must appear BEFORE the tag.

Session A Session object stores information about, or change settings for a user session. Variables stored in a Session object hold information about one single user, and are available to all pages in one application. Common information stored in session variables are name, id, and preferences. The server creates a new Session object for each new user, and destroys the Session object when the session expires.