IS 4506 Interactive Clients & Servers
Overview Fat Client versus Fat Server Spectrum of Web content formats Active Server Pages Active Server Page elements Use of the script tag
Client /Server Architecture Server PCs Middleware
Web Client/Server Architecture Client Web Browser HTTP Server INTERNETINTRANET
Spectrum of Web Content Formats Personalization and Transaction Processing Static Active Linked (Basic) Content Dynamic HTML Data-bound Applications Interactive Applications
Active Server Pages Dynamic content Easy database connectivity Scalable server-side solution Integrated state and user management Reusable software model
Active Server Page Elements ASP scripts Objects ASP built-in objects Installable ASP objects Installable ASP components Component creation
ASP Scripts Flexible server-side scripting Exposes object model Components accessed using properties and methods Temperature conversion example VBScript code
Objects ASP built-in objects Installable ASP objects
ASP Built-in Objects Server Object Application Object Session Object Request Object Response Object ObjectContext Object
Component Creation Created in any language Components follow the COM standard Accessed only by the server Extend ActiveX server components
Use of the Script Tag Script tag on Active Server Pages <% Code %>
ASP Examples Hello.htm Hello.asp Form.htm
Hello.htm Static Hello Hello World!
Hello.asp Active Hello Page > Hello World!
Form.htm Order Sample Order Form Please provide the following info, then click Submit: Title: First Name: Last Name:
Response.asp Thank you, <% Title = Request.Form("title") LastName = Request.Form("lname") If Title = "mr" Then %> Mr. Ms. for your order.
Response2.asp <% Title = Request.Form("title") LastName = Request.Form("lname") FirstName = Request.Form("fname") Response.Write "Thank you " If Title = "mr" Then Response.Write "Mr." & LastName ElseIf Title = "ms" Then Response.Write "Ms." & LastName Else Response.Write FirstName & " " & LastName End If Response.Write " for your order!!" %>
mail.asp <% Dim Message Set message = CreateObject("CDONTS.NewMail") message.send Request.Form("From"), Request.Form("To"), Request.Form("Subject"), Request.Form("text") Set message = Nothing %> The Following Has Been Sent: From: To: Subject: Text:
Lab 11: Active Server Pages
Review Spectrum of Web content formats Active Server Pages Active Server Pages elements Use of the script tag