ASP - PowerPoint PPT Presentation

About This Presentation
Title:

ASP

Description:

Title: Slide 1 Author: RA Last modified by: OU Created Date: 6/12/2006 3:06:16 AM Document presentation format: On-screen Show Company: RA Other titles – PowerPoint PPT presentation

Number of Views:46
Avg rating:3.0/5.0
Slides: 20
Provided by: RA180
Category:
Tags: asp | vbscript

less

Transcript and Presenter's Notes

Title: ASP


1
ASP Web Programming Class
  • Ravi Anand

2
ASP Active Server Pages
What is ASP?
What is ASP? - Microsoft Technology - Can
Run using IIS/PWS/Others - Helps us create
dynamic sites - HTML is static, ASP is
dynamic - Ability to connect to web services,
Databases, Server side components -
Simple, Secure, Fast
3
ASP Active Server Pages
An ASP Page
- Has a .asp extension - Can be edited using
Notepad - Needs no compilation - Scripting
typically done in vbscript - ASP pages are
rendered as HTML pages - Also contains HTML, XML
, client side scripts
4
ASP Active Server Pages
Running An ASP Page
  • On Your desktop
  • Install PWS on Windows 98
  • Install IIS on 2000 /XP
  • On your Server
  • Typically 2003/ 2000 running IIS
  • All it needs is a webserver capable of running
    ASP

5
ASP Active Server Pages
An ASP Page
lthtmlgt ltbodygt lt Response.Write("Hello World!")
gt lt/bodygt lthtmlgt
6
ASP Active Server Pages
ASP Scripting Languages
  • Default Scripting Language is vbscript
  • Can also use other scripting languages
  • such as javascript, PERL, etc
  • The script is executed on the server
  • Server should have the script Engine
  • Browser only gets an HTML ouput

7
ASP Active Server Pages
Creating an ASP PAGE (using vbscript)
  • Fundamentals
  • Variables
  • Loops
  • Conditional Statements

8
ASP Active Server Pages
Creating an ASP PAGE -2
  • Scope Application, Session , function/sub
    routine
  • Declaring a Variable
  • lt dim x gt
  • Refer Example 2
  • Declaring Arrays
  • Dim students(6)
  • - Refer Example 3

9
ASP Active Server Pages
Creating an ASP PAGE - 3
  • Dynamic Content
  • Create HTML dynamically
  • Eg.Tables / Rows
  • Refer Example 4 , 5

10
ASP Active Server Pages
Creating an ASP PAGE - 4
  • - Writing routines
  • sub Add2Numbers(int1 , int2)
  • response.write(int1 int2)
  • end sub

11
ASP Active Server Pages
Creating an ASP Form
ltform name Action METHODPOSTGETgt lt/formgt
Example 8 , 9
12
ASP Active Server Pages
Handling cookies
  • -Write to a cookie
  • -Reading from a cookie

13
ASP Active Server Pages
Response Object
  • -Send output to the user from the server

14
ASP Active Server Pages
Request Object
  • -Get information from the user

15
ASP Active Server Pages
Session Object
  • -Store information related to a user session
  • E.g. Data Retrieved, Authentication , Error
    Information
  • Data that will be used across the Screens in the
    same session
  • Storing Info in a Session Variable
  • Session(AccountNumber")ABCDE1234"
  • Session(Location")Macomb
  • Retrieving info from a Session
  • Response.Write(Session(AccountNumber"))gt

16
ASP Active Server Pages
Application Object
  • To group the files in an application

17
ASP Active Server Pages
Server Object
  • -To access properties and methods on the server.

18
ASP Active Server Pages
Error Object
  • -Information of any error that
  • occurs in scripts in an ASP page

19
ASP Active Server Pages
Global.asa
ltscript language"vbscript" runat"server"gt sub
Application_OnStart 'some code end sub Sub
Application_OnEnd 'some code end Sub sub
Session_OnStart 'some code end sub sub
Session_OnEnd 'some code end sublt/scriptgt
Write a Comment
User Comments (0)
About PowerShow.com